diff options
author | Bob Gilligan <gilligan@vyatta.com> | 2010-01-26 16:23:49 -0800 |
---|---|---|
committer | Bob Gilligan <gilligan@vyatta.com> | 2010-01-26 16:23:49 -0800 |
commit | 030df66622d9448e57e9abd371c840cbf851c080 (patch) | |
tree | d627220f8db8ee87bb6210b66577a1247ddb5b70 | |
parent | a388acecee4bc21a1876b4be3f0181d6bb0c95e6 (diff) | |
download | vyatta-cfg-system-030df66622d9448e57e9abd371c840cbf851c080.tar.gz vyatta-cfg-system-030df66622d9448e57e9abd371c840cbf851c080.zip |
Bugfix 5229: Save old config info when installing on pre-existing RAID group.
-rwxr-xr-x | scripts/install/install-get-partition | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/install/install-get-partition b/scripts/install/install-get-partition index 9ca5d9c3..37ec5580 100755 --- a/scripts/install/install-get-partition +++ b/scripts/install/install-get-partition @@ -168,12 +168,23 @@ check_for_old_raid () { warn_of_dire_consequences ROOT_PARTITION=$INSTALL_DRIVE + ROOT_PARTITION_TYPE=new # make sure we aren't working on a mounted part unmount "$INSTALL_DRIVE" # check for an old config on the partition - check_config_partition "$ROOT_PARTITION" + mkdir -p /mnt/tmp + output=$(mount -r /dev/"$ROOT_PARTITION" /mnt/tmp 2>&1) + if [ $? != 0 ]; then + echo "Cannot mount $ROOT_PARTITION to check for old config file" + lecho "Cannot mount $ROOT_PARTITION"."\n" + lecho "mount $ROOT_PARTITION /mnt/tmp\n" + lecho "$output" + else + save_old_info "$ROOT_PARTITION" + umount /mnt/tmp + fi # create the filesystem on the part make_filesystem "$ROOT_PARTITION" |