summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Oudompheng <remyoudompheng@gmail.com>2011-04-12 21:30:19 +0200
committerDan McGee <dan@archlinux.org>2011-04-13 10:33:22 -0500
commita93e058b68187c92a57612b19f8773472d4ff9cb (patch)
tree0cb27c35d488c8791efde042f3390f1bdf8693cb
parent8e8391e17c09a576896972c484b3d2194a7684c1 (diff)
makepkg.sh.in: fix a GNU-ism in su invocation
GNU su supports the -c option to specify a command to execute. However, other flavours of su may have a different interpretation of the '-c' flag (e.g. FreeBSD and OpenBSD). The behaviour is correct when '-c' follows an explicit username. Signed-off-by: Rémy Oudompheng <remy@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--scripts/makepkg.sh.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 1c8c50e8..69922c99 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -394,7 +394,7 @@ run_pacman() {
if [ "$(type -p sudo)" ]; then
cmd="sudo $cmd"
else
- cmd="su -c '$cmd'"
+ cmd="su root -c '$cmd'"
fi
fi
eval "$cmd"