diff options
author | rbalocca <rbalocca@vyatta.com> | 2008-03-06 13:36:02 -0800 |
---|---|---|
committer | rbalocca <rbalocca@vyatta.com> | 2008-03-06 13:36:02 -0800 |
commit | d857e325ba12fa374411e8499f74fecec4c66b3d (patch) | |
tree | def4d66c5948fa7dc348ca210f3a77bc7f2f435f | |
parent | 0d8574ebed484215ec8b8c0f709f04c1a1311333 (diff) | |
parent | eee5bfc8b0d866eef2811b5f77917e05ee7bcee9 (diff) | |
download | vyatta-cfg-d857e325ba12fa374411e8499f74fecec4c66b3d.tar.gz vyatta-cfg-d857e325ba12fa374411e8499f74fecec4c66b3d.zip |
Merge branch 'glendale' into hollywood
-rw-r--r-- | debian/control | 6 | ||||
-rwxr-xr-x | scripts/VyattaConfigLoad.pm | 21 | ||||
-rwxr-xr-x | scripts/vyatta-config-loader.pl | 13 | ||||
-rw-r--r-- | scripts/vyatta-interfaces.pl | 2 |
4 files changed, 25 insertions, 17 deletions
diff --git a/debian/control b/debian/control index c317ca4..c359bcd 100644 --- a/debian/control +++ b/debian/control @@ -13,10 +13,12 @@ Depends: bash (>= 3.1), procps (>= 1:3.2.7-3), vyatta-quagga | quagga, coreutils (>= 5.97-5.3), - bsdutils, vyatta-op, vyatta-config-migrate, - dhcp3-client | vyatta-dhcp3-client + dhcp3-client | vyatta-dhcp3-client, + bsdutils (>=1:2.13), + libc6 (>= 2.7-6) +Replaces: vyatta-cfg-firewall Suggests: util-linux (>= 2.13-5), net-tools, ethtool, diff --git a/scripts/VyattaConfigLoad.pm b/scripts/VyattaConfigLoad.pm index c09616d..a88d14d 100755 --- a/scripts/VyattaConfigLoad.pm +++ b/scripts/VyattaConfigLoad.pm @@ -9,16 +9,17 @@ use VyattaConfig; # configuration ordering. higher rank configured before lower rank. my $default_rank = 0; -my %config_rank = ( - 'interfaces' => 100, - 'interfaces bridge' => 99, - 'interfaces ethernet' => 98, - 'interfaces tunnel' => 91, - 'system' => 90, - 'protocols static' => 85, - 'service ssh' => 84, - 'service telnet' => 83, - ); +my %config_rank = ( + 'qos-policy' => 110, + 'interfaces' => 100, + 'interfaces bridge' => 99, + 'interfaces ethernet' => 98, + 'interfaces tunnel' => 91, + 'system' => 90, + 'protocols static' => 85, + 'service ssh' => 84, + 'service telnet' => 83, +); my @all_nodes = (); my @all_naked_nodes = (); diff --git a/scripts/vyatta-config-loader.pl b/scripts/vyatta-config-loader.pl index 370a669..e2ecd99 100755 --- a/scripts/vyatta-config-loader.pl +++ b/scripts/vyatta-config-loader.pl @@ -14,6 +14,11 @@ if (!open(OLDOUT, ">&STDOUT") || !open(OLDERR, ">&STDERR") print STDERR "Cannot dup STDOUT/STDERR: $!\n"; exit 1; } + +if (!open(WARN, "|/usr/bin/logger -t config-loader -p local0.warning")) { + print OLDERR "Cannot open syslog: $!\n"; + exit 1; +} sub restore_fds { open(STDOUT, ">&OLDOUT"); @@ -35,7 +40,7 @@ my $CWRAPPER = '/opt/vyatta/sbin/vyatta-cfg-cmd-wrapper'; system("$CWRAPPER begin"); if ($? >> 8) { print OLDOUT "Cannot set up configuration environment\n"; - print STDOUT "Cannot set up configuration environment\n"; + print WARN "Cannot set up configuration environment\n"; restore_fds(); exit 1; } @@ -51,7 +56,7 @@ foreach (@all_nodes) { $ret = system("$commit_cmd"); if ($ret >> 8) { print OLDOUT "Commit failed at rank $cur_rank\n"; - print STDOUT "Commit failed at rank $cur_rank\n"; + print WARN "Commit failed at rank $cur_rank\n"; system("$cleanup_cmd"); # continue after cleanup (or should we abort?) } @@ -62,14 +67,14 @@ foreach (@all_nodes) { if ($ret >> 8) { $cmd =~ s/^.*?set /set /; print OLDOUT "[[$cmd]] failed\n"; - print STDOUT "[[$cmd]] failed\n"; + print WARN "[[$cmd]] failed\n"; # continue after set failure (or should we abort?) } } $ret = system("$commit_cmd"); if ($ret >> 8) { print OLDOUT "Commit failed at rank $cur_rank\n"; - print STDOUT "Commit failed at rank $cur_rank\n"; + print WARN "Commit failed at rank $cur_rank\n"; system("$cleanup_cmd"); # exit normally after cleanup (or should we exit with error?) } diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl index fc10c4d..482faa8 100644 --- a/scripts/vyatta-interfaces.pl +++ b/scripts/vyatta-interfaces.pl @@ -358,7 +358,7 @@ sub is_valid_addr { } my ($addr, $net); - if ($addr_net =~ m/^([0-9\.\:]+)\/(\d+)$/) { + if ($addr_net =~ m/^([0-9a-fA-F\.\:]+)\/(\d+)$/) { $addr = $1; $net = $2; } else { |