From 56b574e7e17410f801de30af5daeaf1ced59c47f Mon Sep 17 00:00:00 2001 From: unknowndevQwQ Date: Wed, 28 Sep 2022 00:02:11 +0800 Subject: [PATCH] fix: fix can't run it as expected in freebsd 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 6e6990f38b8c..a954efbe83cc 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."