diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/install/install-image-existing | 5 | ||||
-rwxr-xr-x | scripts/install/install-postinst-new | 24 | ||||
-rwxr-xr-x | scripts/vyatta-bonding.pl | 2 |
3 files changed, 25 insertions, 6 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 diff --git a/scripts/install/install-postinst-new b/scripts/install/install-postinst-new index c96f5657..0f7a9b61 100755 --- a/scripts/install/install-postinst-new +++ b/scripts/install/install-postinst-new @@ -39,9 +39,16 @@ copy_config () { else # Find the config files and give the user the option to copy config files # TODO: this needs cleaned up - if [ -f "${VYATTA_CFG_DIR}/config.boot" ]; then - config=${VYATTA_CFG_DIR}/config.boot + + # First candidate: The config file on the running system. Note + # that this will include any changes made and saved by the user, + # as well as changes such as interface MAC addresses automatically + # generated by the user. So it is the first choice. + if [ -f "${VYATTA_NEW_CFG_DIR}/config.boot" ]; then + config=${VYATTA_NEW_CFG_DIR}/config.boot fi + + # Second candidate: The config file on floppy, if one exists. if [ -f "${FD_CFG_DIR}/config.boot" ]; then if [ -z "$config" ]; then config="${FD_CFG_DIR}/config.boot" @@ -50,10 +57,16 @@ copy_config () { fi fi + # Third candidate: The default config file + DEF_CONF=$vyatta_sysconfdir/config.boot.default + if [ -f $DEF_CONF ]; then + config="$config $DEF_CONF" + fi + if [ -n "$config" ]; then - echo "I found the following configuration files" + echo "I found the following configuration files:" for file in $config; do - echo $file + echo " $file" done default=$(echo -e $config | awk '{ print $1 }') @@ -64,7 +77,8 @@ copy_config () { done echo - cp -p $configfile $cfg_dir/ >&/dev/null + echo "Copying $configfile to $INSTALL_DRIVE." + cp -p $configfile $cfg_dir/config.boot >&/dev/null if [ $? != 0 ]; then lecho "Error copying file $configfile to config directory. Exiting..." exit 1 diff --git a/scripts/vyatta-bonding.pl b/scripts/vyatta-bonding.pl index 8cd8d5f0..eac89f07 100755 --- a/scripts/vyatta-bonding.pl +++ b/scripts/vyatta-bonding.pl @@ -155,7 +155,7 @@ sub if_up { my $smp_affinity = get_irq_affinity($intf); if ($smp_affinity) { - system "irq-affinity.pl $intf $smp_affinity" + system "/opt/vyatta/sbin/irq-affinity.pl $intf $smp_affinity" and warn "Could not set $intf smp_affinity $smp_affinity\n"; } } |