summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2008-03-26 12:33:27 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2008-03-26 12:33:27 -0700
commit4e0f41dd1c43468310b554866a81c92e84e98995 (patch)
tree82cdcdec09e00440b1f516df6f3ec5ad3a85152c /scripts
parent721d32cfcd8330f06ef6aa8e6c8b5a2dba69436d (diff)
downloadvyatta-cfg-quagga-4e0f41dd1c43468310b554866a81c92e84e98995.tar.gz
vyatta-cfg-quagga-4e0f41dd1c43468310b554866a81c92e84e98995.zip
fix for bug 3032: rename pre-glendale config files during install-system.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/install-system11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/install-system b/scripts/install-system
index 8d119087..2823746b 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