summaryrefslogtreecommitdiff
path: root/scripts/install-system
diff options
context:
space:
mode:
authorRobert Bays <rbays@cartagena.vyatta.com>2008-09-03 18:22:19 -0400
committerRobert Bays <rbays@cartagena.vyatta.com>2008-09-03 18:22:19 -0400
commit0740e78bcdea29ca5fb34ab3fb05edbcf3aaf3e6 (patch)
tree327755924533310e81bc2d24b5035c920d465e31 /scripts/install-system
parent11eca774916110faaf375470c9a4d73c498d8cae (diff)
parenta43151a69c1482c1c10806e83271f94fb691199d (diff)
downloadvyatta-cfg-system-0740e78bcdea29ca5fb34ab3fb05edbcf3aaf3e6.tar.gz
vyatta-cfg-system-0740e78bcdea29ca5fb34ab3fb05edbcf3aaf3e6.zip
Merge branch 'islavista' of http://git.vyatta.com/vyatta-cfg-system into islavista
Conflicts: scripts/install-system
Diffstat (limited to 'scripts/install-system')
-rwxr-xr-xscripts/install-system36
1 files changed, 31 insertions, 5 deletions
diff --git a/scripts/install-system b/scripts/install-system
index e7364f2b..3b13a254 100755
--- a/scripts/install-system
+++ b/scripts/install-system
@@ -789,9 +789,25 @@ copy_config () {
change_password() {
local user=$1
- local pwd
- read pwd
- local epwd=$(mkpasswd -H md5 $pwd | sed 's:/:\\/:g')
+ local pwd1="1"
+ local pwd2="2"
+
+ until [ $pwd1 == $pwd2 ]
+ do
+ echo -n "Enter $user "
+ pwd1=$(mkpasswd -H md5)
+ local salt=$(echo $pwd1 | awk -F$ '{print $3}')
+
+ echo -n "Retype $user "
+ pwd2=$(mkpasswd -H md5 -S $salt)
+
+ if [ $pwd1 != $pwd2 ]
+ then echo "Passwords do not match"
+ fi
+ done
+
+ # escape any slashes in resulting password
+ local epwd=$(echo $pwd | sed 's:/:\\/:g')
sed -i \
-e "/ user $user {/,/}/s/encrypted-password:.*\$/encrypted-password: \"$epwd\"/" \
@@ -803,9 +819,7 @@ system_setup () {
local response=$(get_response "Yes" "Yes No Y N")
if [ "$response" == "yes" ] || [ "$response" == "y" ]; then
- echo -n 'System administrator (root) password: '
change_password root
- echo -n 'Router administrator (vyatta) password: '
change_password vyatta
fi
}
@@ -845,6 +859,18 @@ install_grub () {
grub_options="ide=nodma"
fi
+ # Check if using aufs
+ if grep -q aufs /proc/filesystems
+ then
+ if [ -z "$grub_options" ]
+ then
+ grub_options="union=aufs"
+ else
+ grub_options="$grub_options union=aufs"
+ fi
+ fi
+
+ # if union install tell grub-setup
if eval "$UNION"; then
grub_args="-u"
fi