diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2008-03-26 12:33:27 -0700 |
---|---|---|
committer | rbalocca <rbalocca@vyatta.com> | 2008-06-12 16:37:57 -0700 |
commit | 743e305e810ac08d8b69c8cdef5880e71c7b765e (patch) | |
tree | ef5a9564a819c9039bb614bed1acb952ba230d7b /scripts | |
parent | 9fa993cfae190e0d1b654ec2f94757665f31c137 (diff) | |
download | vyatta-cfg-quagga-743e305e810ac08d8b69c8cdef5880e71c7b765e.tar.gz vyatta-cfg-quagga-743e305e810ac08d8b69c8cdef5880e71c7b765e.zip |
fix for bug 3032: rename pre-glendale config files during install-system.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/install-system | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/install-system b/scripts/install-system index 79a87a63..d11aca78 100755 --- a/scripts/install-system +++ b/scripts/install-system @@ -271,6 +271,16 @@ select_partition () { PARTITION=$lpartition } +rename_old_config() { + files=$(find /mnt/config -mindepth 1 -type f | grep -v pre-glendale) + for f in $files; do + if grep -q '/\*XORP Configuration File, v1.0\*/' $f >&/dev/null; then + CURTIME=$(date +%F-%H%M%S) + mv $f $f.pre-glendale.$CURTIME + fi + done +} + ## check_config_partition # look to see if this partition contains a config file # and back it up @@ -303,6 +313,7 @@ check_config_partition() { echo -e "Warning: error in copying the old config partition.\nSee $INSTALL_LOG for more details." echo -e "Warning: error in copying the old config partition.\ncp -pR /mnt/tmp/* /mnt/config\n$output\n" >> $INSTALL_LOG fi + rename_old_config fi done fi |