diff options
author | Bob Gilligan <gilligan@vyatta.com> | 2010-11-21 07:59:04 -0800 |
---|---|---|
committer | Bob Gilligan <gilligan@vyatta.com> | 2010-11-21 07:59:04 -0800 |
commit | 92f6f66814c0d9e9a82048ac99cf50d839678dc3 (patch) | |
tree | 95fe67ca2720be15cb163df2c2d92992a844b4a9 | |
parent | f3503c4909b9ca8d383e49259b762824cda3fd41 (diff) | |
download | vyatta-cfg-system-92f6f66814c0d9e9a82048ac99cf50d839678dc3.tar.gz vyatta-cfg-system-92f6f66814c0d9e9a82048ac99cf50d839678dc3.zip |
Bugfix 6457: Don't ask the question if you're not going to like the answer.
-rwxr-xr-x | scripts/install/install-get-partition | 34 | ||||
-rwxr-xr-x | scripts/install/install-image | 22 |
2 files changed, 23 insertions, 33 deletions
diff --git a/scripts/install/install-get-partition b/scripts/install/install-get-partition index 8b4bd406..50ba7505 100755 --- a/scripts/install/install-get-partition +++ b/scripts/install/install-get-partition @@ -885,9 +885,10 @@ unmount () { turnoffswap while true; do - # check if we are in a live CD boot + if ! is_live_cd_boot; then - # running installed system. check boot drive/partition. + # We're running on an installed system, so we don't have to find + # a partition to install onto if is_union_install; then # this is a union install ROOT_PARTITION_TYPE=union @@ -895,27 +896,9 @@ while true; do # this is an old, non-union install ROOT_PARTITION_TYPE=old fi - while [ -z "$response" ]; do - cat <<EOF -You are running an installed system. Do you want to use the current install -EOF - echo -n "partition? (Yes/No) [Yes]: " - response=$(get_response "Yes" "Yes No Y N") - echo - done - if [ "$response" == "no" ] || [ "$response" == "n" ]; then - # for simplicity, require the current install partition if running an - # installed system. - ROOT_PARTITION_TYPE='' - break - else - # flag them as found but we don't actually need them - ROOT_PARTITION=dummy - INSTALL_DRIVE=dummy - fi - fi - if [ -n "$ROOT_PARTITION" ]; then - # got partition. done. + # flag partition and drive as found but we don't actually need them + ROOT_PARTITION=dummy + INSTALL_DRIVE=dummy break fi @@ -965,6 +948,11 @@ EOF setup_method_auto fi + if [ -n "$ROOT_PARTITION" ]; then + # got partition. done. + break + fi + break done diff --git a/scripts/install/install-image b/scripts/install/install-image index cd486404..c201be3c 100755 --- a/scripts/install/install-image +++ b/scripts/install/install-image @@ -208,21 +208,23 @@ fi trap sig_handler INT KILL trap exit_handler EXIT -cat <<EOF +if is_live_cd_boot; then + cat <<EOF Welcome to the Vyatta install program. This script will walk you through the process of installing the Vyatta image to a local hard drive. EOF -response='' -while [ -z "$response" ] -do - echo -n "Would you like to continue? (Yes/No) [Yes]: " - response=$(get_response "Yes" "Yes No Y N") - if [ "$response" == "no" ] || [ "$response" == "n" ]; then - fail_exit 'Ok then.' - fi -done + response='' + while [ -z "$response" ] + do + echo -n "Would you like to continue? (Yes/No) [Yes]: " + response=$(get_response "Yes" "Yes No Y N") + if [ "$response" == "no" ] || [ "$response" == "n" ]; then + fail_exit 'Ok then.' + fi + done +fi if is_live_cd_boot; then if [ -n "$NEW_ISO" ]; then |