From d54037b8a95e9156769040f1e773b9bac581468b Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Sat, 31 Oct 2009 17:50:46 +0100 Subject: [PATCH] install.sh: Try to setup jail only when root --- install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 68aad58..f68abd9 100755 --- a/install.sh +++ b/install.sh @@ -49,7 +49,11 @@ chmod a+rwx,g+s,o+t "$cfg_reporoot" || echo "WARNING: Cannot chmod $cfg_reporoot if [ -n "$cfg_chrooted" ]; then echo "*** Setting up chroot jail for pushing..." - ./jailsetup.sh + if [ "$(id -u)" -eq 0 ]; then + ./jailsetup.sh + else + echo "WARNING: Skipping jail setup, not root" + fi fi -- 2.11.4.GIT