diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2009-11-06 17:50:21 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2009-11-06 17:50:21 -0800 |
commit | 11d97665f9fecff30862d284907968ebece703e2 (patch) | |
tree | cfd538bf2812b937821b62d76ec11868d80f2294 /scripts/install/install-image-existing | |
parent | dee8da10476d2d6e7269809ffd56ccaa42d7474d (diff) | |
download | vyatta-cfg-quagga-11d97665f9fecff30862d284907968ebece703e2.tar.gz vyatta-cfg-quagga-11d97665f9fecff30862d284907968ebece703e2.zip |
copy the whole config directory during install
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 |