diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-11-11 15:54:04 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-11-11 15:54:04 -0800 |
commit | 8392f72c7c78d94601c83234526cd5d231ce48ab (patch) | |
tree | ad0bfec388c737d74ca1ad25b2b624173d47f94b /scripts/install/install-image-existing | |
parent | b40d5ead178e32595b27b352d8da6d3e3d311259 (diff) | |
parent | 5c21e9f6d804fe47e71564d0119684dfe02513de (diff) | |
download | vyatta-cfg-quagga-8392f72c7c78d94601c83234526cd5d231ce48ab.tar.gz vyatta-cfg-quagga-8392f72c7c78d94601c83234526cd5d231ce48ab.zip |
Merge branch 'kenwood' of suva.vyatta.com:/git/vyatta-cfg-system into kenwood
Diffstat (limited to 'scripts/install/install-image-existing')
-rwxr-xr-x | scripts/install/install-image-existing | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/install/install-image-existing b/scripts/install/install-image-existing index 0b5cba62..214fd2c8 100755 --- a/scripts/install/install-image-existing +++ b/scripts/install/install-image-existing @@ -87,19 +87,20 @@ if ! grep -q 'tmpfs /var/run ' $PI_FSTAB >&/dev/null; then echo 'tmpfs /var/run tmpfs nosuid,nodev 0 0' >$PI_FSTAB fi -# save current config if needed -def_cfg="$VYATTA_CFG_DIR/config.boot" -if [ -f "$def_cfg" ]; then +# save current config dir if needed +if [ -f "$VYATTA_CFG_DIR/config.boot" ]; then resp='' while [ -z "$resp" ]; do - echo 'Would you like to use the current configuration' + echo 'Would you like to save the current configuration ' + echo 'directory and use the current start-up configuration ' echo -n 'for the new version? (Yes/No) [Yes]: ' resp=$(get_response "Yes" "Yes No Y N") if [ "$resp" == 'yes' ] || [ "$resp" == 'y' ]; then echo 'Copying current configuration...' ndir=${INST_ROOT}${VYATTA_CFG_DIR} mkdir -p $ndir - cp -p $def_cfg $ndir/ + find $VYATTA_CFG_DIR -maxdepth 1 -mindepth 1 \ + -exec cp '-a' '{}' "$ndir/" ';' chgrp -R vyattacfg $ndir chmod -R 775 $ndir fi |