summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBob Gilligan <gilligan@vyatta.com>2011-08-12 17:27:21 -0700
committerBob Gilligan <gilligan@vyatta.com>2011-08-12 17:27:21 -0700
commit806e7fb314fc7f8723070bf51f0961590372f90c (patch)
tree864fa9fab6826ae1074f23fff55488f32b6b3f87 /scripts
parentd891558527fdc077b8c0b37c24cb8b17a2ae7043 (diff)
parent4c880822e64eb22c0a91357b987ae096d848a84c (diff)
downloadvyatta-cfg-system-806e7fb314fc7f8723070bf51f0961590372f90c.tar.gz
vyatta-cfg-system-806e7fb314fc7f8723070bf51f0961590372f90c.zip
Merge branch 'napa' of http://git.vyatta.com/vyatta-cfg-system into napa
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/install/install-functions1
-rwxr-xr-xscripts/install/install-image-existing10
-rwxr-xr-xscripts/vyatta-interfaces.pl8
3 files changed, 10 insertions, 9 deletions
diff --git a/scripts/install/install-functions b/scripts/install/install-functions
index 5670f82a..5e24a921 100755
--- a/scripts/install/install-functions
+++ b/scripts/install/install-functions
@@ -41,6 +41,7 @@ CD_SQUASH_ROOT=/mnt/cdsquash
# the vyatta config dir
VYATTA_CFG_DIR=${vyatta_sysconfdir}/config
+VYATTA_NEW_CFG_DIR=/config
# the floppy config dir
FD_CFG_DIR=/media/floppy/config
diff --git a/scripts/install/install-image-existing b/scripts/install/install-image-existing
index d75a62b6..7c75b35b 100755
--- a/scripts/install/install-image-existing
+++ b/scripts/install/install-image-existing
@@ -175,12 +175,12 @@ fi
# Check to make sure we have enough space to copy the config and data dirs...
#
space_avail=`df -k / | tail -1 | awk '{ print $4 }'`
-if [ -e $${VYATTA_CFG_DIR}/data ]; then
- space_needed_data=`du -s ${VYATTA_CFG_DIR}/data | awk '{ print $1 }'`
+if [ -e $${VYATTA_NEW_CFG_DIR}/data ]; then
+ space_needed_data=`du -s ${VYATTA_NEW_CFG_DIR}/data | awk '{ print $1 }'`
else
space_needed_data=0
fi
-space_needed_configdata=`du -s ${VYATTA_CFG_DIR} | awk '{ print $1 }'`
+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
@@ -194,9 +194,9 @@ if [ $space_avail -gt $space_needed_configdata ]; then
resp=$(get_response "Yes" "Yes No Y N")
if [ "$resp" == 'yes' ] || [ "$resp" == 'y' ]; then
echo 'Copying current configuration...'
- ndir=${INST_ROOT}/config
+ ndir=${INST_ROOT}/${VYATTA_NEW_CFG_DIR}
mkdir -p $ndir
- find $VYATTA_CFG_DIR -maxdepth 1 -mindepth 1 \
+ find $VYATTA_NEW_CFG_DIR -maxdepth 1 -mindepth 1 \
-exec cp '-a' '{}' "$ndir/" ';'
chgrp -R vyattacfg $ndir
chmod -R 775 $ndir
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl
index 26f2791a..a5bb2553 100755
--- a/scripts/vyatta-interfaces.pl
+++ b/scripts/vyatta-interfaces.pl
@@ -290,12 +290,12 @@ sub is_valid_addr_commit {
my ($dhcp, $static_v4);
foreach my $addr (@addrs) {
next if ($addr eq 'dhcpv6');
-
if ($addr eq 'dhcp') {
$dhcp = 1;
- } elsif ($ipaddr_hash{$addr} && !is_ip_configured($ifname, $addr)) {
- my $h = Vyatta::Misc::get_ipnet_intf_hash();
- print "Warning: possible duplicate address $addr on $h->{$addr}\n";
+ } elsif (!Vyatta::Interface::is_uniq_address($addr)) {
+ my $h = Vyatta::Misc::get_ipnet_intf_hash();
+ print "Error: duplicate address $addr on $h->{$addr}\n";
+ exit 1;
} elsif ( is_ipv4($addr) ) {
$static_v4 = 1;
}