diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-06-24 17:55:35 -0500 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-06-24 17:55:35 -0500 |
commit | 1bc15089f78fc0778be78448e43ad33fd05e1e55 (patch) | |
tree | 156b84ae2f9a6eb4cf43f301141d960b596d73a3 | |
parent | 28c7e5cdba4add122f4a8ae57dc30f20fe28bee4 (diff) | |
download | vyatta-cfg-quagga-1bc15089f78fc0778be78448e43ad33fd05e1e55.tar.gz vyatta-cfg-quagga-1bc15089f78fc0778be78448e43ad33fd05e1e55.zip |
Make add system image use the new config directory for copying files
-rwxr-xr-x | scripts/install/install-functions | 1 | ||||
-rwxr-xr-x | scripts/install/install-image-existing | 10 |
2 files changed, 6 insertions, 5 deletions
diff --git a/scripts/install/install-functions b/scripts/install/install-functions index 5670f82a..5e24a921 100755 --- a/scripts/install/install-functions +++ b/scripts/install/install-functions @@ -41,6 +41,7 @@ CD_SQUASH_ROOT=/mnt/cdsquash # the vyatta config dir VYATTA_CFG_DIR=${vyatta_sysconfdir}/config +VYATTA_NEW_CFG_DIR=/config # the floppy config dir FD_CFG_DIR=/media/floppy/config diff --git a/scripts/install/install-image-existing b/scripts/install/install-image-existing index 13af9bf8..94a0033b 100755 --- a/scripts/install/install-image-existing +++ b/scripts/install/install-image-existing @@ -175,12 +175,12 @@ fi # Check to make sure we have enough space to copy the config and data dirs... # space_avail=`df -k / | tail -1 | awk '{ print $4 }'` -if [ -e $${VYATTA_CFG_DIR}/data ]; then - space_needed_data=`du -s ${VYATTA_CFG_DIR}/data | awk '{ print $1 }'` +if [ -e $${VYATTA_NEW_CFG_DIR}/data ]; then + space_needed_data=`du -s ${VYATTA_NEW_CFG_DIR}/data | awk '{ print $1 }'` else space_needed_data=0 fi -space_needed_configdata=`du -s ${VYATTA_CFG_DIR} | awk '{ print $1 }'` +space_needed_configdata=`du -s ${VYATTA_NEW_CFG_DIR} | awk '{ print $1 }'` space_needed_config=$(($space_needed_configdata - $space_needed_data)) # save current config dir if needed @@ -192,9 +192,9 @@ if [ $space_avail -gt $space_needed_configdata ]; then resp=$(get_response "Yes" "Yes No Y N") if [ "$resp" == 'yes' ] || [ "$resp" == 'y' ]; then echo 'Copying current configuration...' - ndir=${INST_ROOT}/config + ndir=${INST_ROOT}/${VYATTA_NEW_CFG_DIR} mkdir -p $ndir - find $VYATTA_CFG_DIR -maxdepth 1 -mindepth 1 \ + find $VYATTA_NEW_CFG_DIR -maxdepth 1 -mindepth 1 \ -exec cp '-a' '{}' "$ndir/" ';' chgrp -R vyattacfg $ndir chmod -R 775 $ndir |