summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-07-04 13:21:57 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-07-04 13:21:57 -0700
commit9e1fe74bdcd68ce3f39afcacde91ef5bc14470f9 (patch)
treefdfb38e14f2ef609f901f136a3b003d881c6f69d
parent471387b1db7f6e9952ae0d709840560cb0d0bc6d (diff)
parentafcffd6f2208aa241b346c501d749e3edc5d7dd1 (diff)
downloadvyatta-cfg-quagga-9e1fe74bdcd68ce3f39afcacde91ef5bc14470f9.tar.gz
vyatta-cfg-quagga-9e1fe74bdcd68ce3f39afcacde91ef5bc14470f9.zip
Merge branch 'hollywood' of suva.vyatta.com:/git/vyatta-cfg-system into hollywood
-rwxr-xr-xscripts/install-system15
1 files changed, 12 insertions, 3 deletions
diff --git a/scripts/install-system b/scripts/install-system
index 5a9c0309..b5eefe62 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/
@@ -632,9 +640,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