From 239545a6e81884091610c59e548448a15cadafbf Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 7 Nov 2008 17:35:01 -0800 Subject: Handle older format config files in password reset Bugfix 3665 Some config files have colon after tag, others do not. install-system password setting should handle both formats. --- scripts/install-system | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/install-system b/scripts/install-system index e4464ede..ee0ebb5f 100755 --- a/scripts/install-system +++ b/scripts/install-system @@ -856,7 +856,7 @@ copy_config () { set_encrypted_password() { sed -i \ - -e "/ user $1 {/,/}/s/encrypted-password .*\$/encrypted-password \"$2\"/" $3 + -e "/ user $1 {/,/}/s/encrypted-password.*\$/encrypted-password \"$2\"/" $3 } change_password() { -- cgit v1.2.3 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') 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