diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-07-07 17:00:51 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-07-07 17:00:51 -0700 |
commit | e5c331a28b6ac6e30925dfea8827bd5ce3f1c816 (patch) | |
tree | 8d8a0a4eb86fe5735798562279a47a2199c34bf6 /scripts | |
parent | 28b7618bf24ea745d5d7e5a287de1aa728111d08 (diff) | |
parent | 7899738d1262d760c86d1d79fcbeceb493d3c1b8 (diff) | |
download | vyatta-cfg-quagga-e5c331a28b6ac6e30925dfea8827bd5ce3f1c816.tar.gz vyatta-cfg-quagga-e5c331a28b6ac6e30925dfea8827bd5ce3f1c816.zip |
Merge branch 'hollywood' of suva.vyatta.com:/git/vyatta-cfg-system into hollywood
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/install-system | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/scripts/install-system b/scripts/install-system index 5a9c0309..a7a0b066 100755 --- a/scripts/install-system +++ b/scripts/install-system @@ -479,7 +479,15 @@ install_root_filesystem () { output=$(umount /mnt/squashfs) # create the fstab - echo -e "/dev/$ROOT_PARTITION\t/\text3\tdefaults\t0 1" >> $rootfsdir/etc/fstab + local rootdev="/dev/$ROOT_PARTITION"; + uuid=$(dumpe2fs -h $rootdev 2>/dev/null | awk '/^Filesystem UUID/ {print $3}') + if [ -z "$uuid" ] + then + echo "Unable to read filesystem UUID. Exiting." + exit 1 + else + echo -e "UUID=$uuid\t/\text3\tdefaults\t0 1" >> $rootfsdir/etc/fstab + fi #setup the hostname file cp /etc/hostname $rootfsdir/etc/ @@ -520,16 +528,19 @@ copy_config () { if [ -z "$config" ]; then config="$fdconfdir/config.boot" else - config="$config\n$fdconfdir/config.boot" + config="$config $fdconfdir/config.boot" fi fi if [ -n "$config" ]; then echo "I found the following configuration files" - echo -e "$config" - default=$(echo -e $config| head -1) + for file in $config + do + echo $file + done + + default=$(echo -e $config | awk '{ print $1 }') - resp='' while [ -z "$configfile" ] do echo -n "Which one should I copy to $INSTALL_DRIVE? [$default]: " @@ -632,9 +643,10 @@ install_grub () { # This allows device to move around and grub will still find it local rootdev="/dev/$ROOT_PARTITION"; uuid=$(dumpe2fs -h $rootdev 2>/dev/null | awk '/^Filesystem UUID/ {print $3}') - if [ -z $uuid ] + if [ -z "$uuid" ] then - GRUB_ROOT="root=$rootdev ro" + echo "Unable to read filesystem UUID. Exiting." + exit 1 else GRUB_ROOT="root=UUID=$uuid ro" fi |