From b6aeb4bfabc762b0060dba71c8b60ea8d602dc86 Mon Sep 17 00:00:00 2001 From: unknowndevQwQ Date: Thu, 29 Sep 2022 05:06:24 +0800 Subject: [PATCH] fix: fix can't run it as expected in freebsd (#5595) In freebsd, su -c expects a login class argument instead of a command, if -c is preceded by a username, then -c and the arguments that follow will be passed as shell arguments --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 6e6990f38..a954efbe8 100755 --- a/install.sh +++ b/install.sh @@ -556,7 +556,7 @@ sudo_sh_c() { elif command_exists sudo; then sh_c "sudo $*" elif command_exists su; then - sh_c "su - -c '$*'" + sh_c "su root -c '$*'" else echoh echoerr "This script needs to run the following command as root."