summaryrefslogtreecommitdiff
path: root/scripts/install/install-image-existing
diff options
context:
space:
mode:
authorMichael Larson <slioch@slioch.vyatta.com>2009-11-13 13:43:40 -0800
committerMichael Larson <slioch@slioch.vyatta.com>2009-11-13 13:43:40 -0800
commitbd04893b403c5979ecb6fa5d5f8b8aa215b19e82 (patch)
tree4516f67e6f20304a77116bab03958c5cb4b9d0d0 /scripts/install/install-image-existing
parent41e01b6cf6993d473ac251be251e5f7489081b17 (diff)
parent3b5ccd729ad0236cfc0350035c294a4b0d395f51 (diff)
downloadvyatta-cfg-system-bd04893b403c5979ecb6fa5d5f8b8aa215b19e82.tar.gz
vyatta-cfg-system-bd04893b403c5979ecb6fa5d5f8b8aa215b19e82.zip
dependency update
Merge branch 'kenwood' of http://git.vyatta.com/vyatta-cfg-system into kenwood Conflicts: debian/control
Diffstat (limited to 'scripts/install/install-image-existing')
-rwxr-xr-xscripts/install/install-image-existing11
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