diff options
author | Bob Gilligan <gilligan@vyatta.com> | 2008-10-01 17:58:47 -0700 |
---|---|---|
committer | Bob Gilligan <gilligan@vyatta.com> | 2008-10-01 17:58:47 -0700 |
commit | 21031c67393d26a814298a8755d4bea43b0834de (patch) | |
tree | 1e4778371fd762230e340d2bfcaf4d072fe0ae7d /scripts/install-system | |
parent | bae23e34cfbf5cfb28e7077239ca16b795f4e9a3 (diff) | |
download | vyatta-cfg-quagga-21031c67393d26a814298a8755d4bea43b0834de.tar.gz vyatta-cfg-quagga-21031c67393d26a814298a8755d4bea43b0834de.zip |
Bugfix: 3727
In the case when we are using a pre-existing RAID group, warn the
user of dire consequences before over-writing the disks.
Diffstat (limited to 'scripts/install-system')
-rw-r--r-- | scripts/install-system | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/scripts/install-system b/scripts/install-system index 15a4285e..5543fecb 100644 --- a/scripts/install-system +++ b/scripts/install-system @@ -206,6 +206,24 @@ probe_drives () { } +warn_of_dire_consequences () { + # Give the user a requisite warning that we are about to nuke their drive + response='' + while [ -z $response ] + do + echo "This will destroy all data on /dev/$INSTALL_DRIVE." + echo -n "Continue? (Yes/No) [No]: " + response=$(get_response "No" "Yes No Y N") + + if [ "$response" == "no" ] || [ "$response" == "n" ]; then + echo "Ok then. Exiting..." + exit 1 + fi + done +} + + + check_for_old_raid () { # First, trigger construction of previously configured RAID groups echo -n "Looking for pre-existing RAID groups..." @@ -264,6 +282,9 @@ check_for_old_raid () { fi echo "Using RAID partition $INSTALL_DRIVE" + + warn_of_dire_consequences + ROOT_PARTITION=$INSTALL_DRIVE # make sure we aren't working on a mounted part @@ -997,19 +1018,7 @@ setup_method_auto() { fi done - # Give the user a requisite warning that we are about to nuke their drive - response='' - while [ -z $response ] - do - echo "This will destroy all data on /dev/$INSTALL_DRIVE." - echo -n "Continue? (Yes/No) [No]: " - response=$(get_response "No" "Yes No Y N") - - if [ "$response" == "no" ] || [ "$response" == "n" ]; then - echo "Ok then. Exiting..." - exit 1 - fi - done + warn_of_dire_consequences echo |