diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-09-03 15:12:52 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-09-03 15:15:42 -0700 |
commit | 6a040ff8506966bae20d7e0638750c7a837e48ad (patch) | |
tree | efd7476a1e9dca7d54b566748a1a473374f554c2 | |
parent | f4955c66ab9ff90ffa02a6385d7b42a27e232495 (diff) | |
download | vyatta-cfg-system-6a040ff8506966bae20d7e0638750c7a837e48ad.tar.gz vyatta-cfg-system-6a040ff8506966bae20d7e0638750c7a837e48ad.zip |
Add support for aufs
If system is booted with aufs (instead of aufs) then propogate
it to the installed grub options.
-rwxr-xr-x | scripts/install-system | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/scripts/install-system b/scripts/install-system index 724ced9d..e8f05cc7 100755 --- a/scripts/install-system +++ b/scripts/install-system @@ -765,9 +765,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\"/" \ @@ -779,9 +795,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 } @@ -821,6 +835,17 @@ 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 /opt/vyatta/sbin/grub-setup "$ROOT_PARTITION" "$grub_options" /mnt/rootfs >>$INSTALL_LOG then echo "OK" |