summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Bays <rbays@lenny.vyatta.com>2008-01-14 13:47:01 -0800
committerRobert Bays <rbays@lenny.vyatta.com>2008-01-14 13:47:01 -0800
commitef9307c050109e974a4994d3b644873401904005 (patch)
tree14f0ca465a5c26941a585275d79614f155d41af7
parent2a4e2baf7a31929c14cdf6cbf1ce2e01a186e905 (diff)
downloadvyatta-cfg-system-ef9307c050109e974a4994d3b644873401904005.tar.gz
vyatta-cfg-system-ef9307c050109e974a4994d3b644873401904005.zip
fix for bug 2607
-rwxr-xr-xscripts/install-system.in14
1 files changed, 9 insertions, 5 deletions
diff --git a/scripts/install-system.in b/scripts/install-system.in
index e626a383..0a3ed1e6 100755
--- a/scripts/install-system.in
+++ b/scripts/install-system.in
@@ -292,24 +292,28 @@ delete_partitions () {
exit 1
fi
- # Look to see if the old config marker file is there.
- if [ -f /mnt/tmp/.vyatta_config ]; then
+ # Look to see if there is a config parition there
+ if [ -f /mnt/tmp/opt/vyatta/etc/config/.vyatta_config ] || [ -f .vyatta_config ]; then
response=''
while [ -z "$response" ]
do
- echo "/dev/$ldrive$part is a config partition!"
+ echo "/dev/$ldrive$part has an old configuration directory!"
echo -ne "Would you like me to save the data on it\nbefore I delete it? (Yes/No) [Yes]: "
response=$(get_response "Yes" "Yes No Y N")
if [ "$response" == "yes" ] || [ "$response" == "y" ]; then
mkdir -p /mnt/config
- output=$(cp -pR /mnt/tmp/* /mnt/config)
+ if [ -d /mnt/tmp/opt/vyatta/etc/config ]; then
+ output=$(cp -pR /mnt/tmp/opt/vyatta/etc/config/* /mnt/config)
+ else
+ output=$(cp -pR /mnt/tmp/* /mnt/config)
+ fi
if [ -n "$output" ]; then
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
fi
done
- fi
+ fi
umount /mnt/tmp
echo "Removing partition $part on /dev/$ldrive" >> $INSTALL_LOG