summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBob Gilligan <gilligan@vyatta.com>2008-11-24 10:53:43 -0800
committerBob Gilligan <gilligan@vyatta.com>2008-11-24 10:53:43 -0800
commit32a07da80b4a23a254b8d1190aca1b61bca47fdd (patch)
tree3ee5a53b536d91e7a644cba6ef0c9901e5759504 /scripts
parenta692e814b585d9e55f47d64fa3794d11840f1111 (diff)
parent081b37958049ed703dce5f4c7a9c39bcbf3f4a4a (diff)
downloadvyatta-cfg-quagga-32a07da80b4a23a254b8d1190aca1b61bca47fdd.tar.gz
vyatta-cfg-quagga-32a07da80b4a23a254b8d1190aca1b61bca47fdd.zip
Merge branch 'jenner' of http://git.vyatta.com/vyatta-cfg-system into jenner
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/install-system27
1 files changed, 27 insertions, 0 deletions
diff --git a/scripts/install-system b/scripts/install-system
index 4993b97c..e8f469c8 100755
--- a/scripts/install-system
+++ b/scripts/install-system
@@ -303,6 +303,33 @@ check_for_old_raid () {
echo "Using RAID partition $INSTALL_DRIVE"
+ raid_degraded=`cat /sys/block/$INSTALL_DRIVE/md/degraded`
+ raid_sync_action=`cat /sys/block/$INSTALL_DRIVE/md/sync_action`
+
+ if [ "$raid_degraded" = "1" ]; then
+ echo
+ if [ "$raid_sync_action" = "recover" ]; then
+ echo "Error: This RAID set is degraded and is in the process of"
+ echo "rebuilding. It is not safe to install onto it while the"
+ echo "rebuild is in progress. Please wait for the rebuild to"
+ echo "complete and then re-start the installation. You may"
+ echo "monitor the progress of the RAID rebuild with the"
+ echo "command:"
+ echo
+ echo " show raid $INSTALL_DRIVE"
+ echo
+ exit 1
+ fi
+ echo "Warning: This RAID set is degraded, but is not in the"
+ echo "process of rebuilding. It is safe to perform the installation"
+ echo "onto a degraded RAID set that is not in the process of"
+ echo "rebuilding. You may stop the installation now and rebuild the"
+ echo "RAID set, or continue installing onto it. If you continue"
+ echo "installing, do not attempt to rebuild the RAID set until the"
+ echo "installation has completed and you have rebooted the system."
+ echo
+ fi
+
warn_of_dire_consequences
ROOT_PARTITION=$INSTALL_DRIVE