From c07932eec342d6ac979b4a7ac8b0abe9730f8365 Mon Sep 17 00:00:00 2001 From: mj Date: Thu, 2 Apr 2015 03:34:55 +0200 Subject: [PATCH] FIX install.sh: no sudo in vz ct --- tools/install.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index d33ced7..1b28365 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -12,15 +12,19 @@ set -e -if [ "$UID" != "0" ]; then CMD_PREFIX="sudo"; else CMD_PREFIX=""; fi +if [ -d /proc/vz ] && [ ! -d /proc/vz/beancounter ]; then + apt-get -yq install curl dialog git nano zsh +else + if [ "$UID" != "0" ]; then CMD_PREFIX="sudo"; else CMD_PREFIX=""; fi -if [ "$SHELL" != "$(which zsh)" ]; then - echo "$(which zsh)" - $CMD_PREFIX echo "enter pass...." + if [ "$SHELL" != "$(which zsh)" ]; then + echo "$(which zsh)" + $CMD_PREFIX echo "enter pass...." - echo "ok" + echo "ok" - $CMD_PREFIX apt-get -yq install curl dialog git nano zsh + $CMD_PREFIX apt-get -yq install curl dialog git nano zsh + fi fi if [ "1" == "2" ]; then -- 2.0.0