From 79e608cc3777130fc575acf6cdac8e20f7b84a38 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Tue, 29 Mar 2011 10:31:07 +0200 Subject: Base install not as root --- base-install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'base-install.sh') diff --git a/base-install.sh b/base-install.sh index 33df507..c19b6d6 100755 --- a/base-install.sh +++ b/base-install.sh @@ -4,16 +4,16 @@ # Author: Andreas Maunz # -if [ "$(id -u)" != "0" ]; then - echo "This script must be run as root" 1>&2 +if [ "$(id -u)" = "0" ]; then + echo "This script must not be run as root" 1>&2 exit 1 fi # Utils -APTITUDE=`which aptitude` -APT_CACHE=`which apt-cache` -DCSS=`which debconf-set-selections` -DPKG=`which dpkg` +APTITUDE="sudo `which aptitude`" +APT_CACHE="`which apt-cache`" +DCSS="sudo `which debconf-set-selections`" +DPKG="`which dpkg`" if [ ! -e $APTITUDE ]; then echo "Aptitude missing. Install aptitude first." 1>&2 -- cgit v1.2.3