summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Gilligan <gilligan@vyatta.com>2011-08-12 17:26:12 -0700
committerBob Gilligan <gilligan@vyatta.com>2011-08-12 17:29:48 -0700
commit8598d47f23dd7adde408d384557e6f8d221681f9 (patch)
treee0509e55d2044d8a0d4cb3cd7fb251595432bb22
parentd4d0574167b8fe45f7b1b87f8c95dc29a8b7a583 (diff)
downloadvyatta-cfg-quagga-8598d47f23dd7adde408d384557e6f8d221681f9.tar.gz
vyatta-cfg-quagga-8598d47f23dd7adde408d384557e6f8d221681f9.zip
Add hook to call a config migration script when upgrading from VSE Demo.
(cherry picked from commit d891558527fdc077b8c0b37c24cb8b17a2ae7043)
-rwxr-xr-xscripts/install/install-image-existing5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/install/install-image-existing b/scripts/install/install-image-existing
index 94a0033b..7c75b35b 100755
--- a/scripts/install/install-image-existing
+++ b/scripts/install/install-image-existing
@@ -183,6 +183,8 @@ fi
space_needed_configdata=`du -s ${VYATTA_NEW_CFG_DIR} | awk '{ print $1 }'`
space_needed_config=$(($space_needed_configdata - $space_needed_data))
+DEMO_MIGRATE_SCRIPT=/opt/vyatta/sbin/demo-to-vse.pl
+
# save current config dir if needed
if [ $space_avail -gt $space_needed_configdata ]; then
resp=''
@@ -198,6 +200,9 @@ if [ $space_avail -gt $space_needed_configdata ]; then
-exec cp '-a' '{}' "$ndir/" ';'
chgrp -R vyattacfg $ndir
chmod -R 775 $ndir
+ if [ -x $DEMO_MIGRATE_SCRIPT ]; then
+ $DEMO_MIGRATE_SCRIPT $ndir/config.boot
+ fi
fi
done
else