From 91de1b9fc321f4488c32aab6ba350272289508e7 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 11 Nov 2008 14:05:07 -0800 Subject: Make sure install-system only run with root privledges Mounting, creating filesystems, etc all require root privledges so check before allowing command to run. --- scripts/install-system | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scripts/install-system') 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 -- cgit v1.2.3