From d891558527fdc077b8c0b37c24cb8b17a2ae7043 Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Fri, 12 Aug 2011 17:26:12 -0700 Subject: Add hook to call a config migration script when upgrading from VSE Demo. --- scripts/install/install-image-existing | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts') diff --git a/scripts/install/install-image-existing b/scripts/install/install-image-existing index 13af9bf8..d75a62b6 100755 --- a/scripts/install/install-image-existing +++ b/scripts/install/install-image-existing @@ -183,6 +183,8 @@ fi space_needed_configdata=`du -s ${VYATTA_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 -- cgit v1.2.3