summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-11-11 14:05:07 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-11-11 14:05:07 -0800
commit91de1b9fc321f4488c32aab6ba350272289508e7 (patch)
tree70fa9f7668a0b10c8c134c68c1df1173c21500bb /scripts
parent5c80cc33c7e5b6c751f399fb28d68e80ad50a6ad (diff)
downloadvyatta-cfg-system-91de1b9fc321f4488c32aab6ba350272289508e7.tar.gz
vyatta-cfg-system-91de1b9fc321f4488c32aab6ba350272289508e7.zip
Make sure install-system only run with root privledges
Mounting, creating filesystems, etc all require root privledges so check before allowing command to run.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/install-system7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/install-system b/scripts/install-system
index 8993ab10..b48394e7 100755
--- a/scripts/install-system
+++ b/scripts/install-system
@@ -24,7 +24,12 @@
#
# Vyatta system installer script.
#
-#
+
+if [ `whoami` != 'root' ] ; then
+ echo "This script must be run with root privileges."
+ exit 1
+fi
+
# If you set VYATTA_AUTO_INSTALL I will try to do an automated install for you
if [ -e /etc/default/vyatta ] ; then