diff options
author | rbalocca <rbalocca@vyatta.com> | 2008-03-06 15:13:33 -0800 |
---|---|---|
committer | rbalocca <rbalocca@vyatta.com> | 2008-03-06 15:13:33 -0800 |
commit | e8e69f6b02d92f165a9c468b65e35ad1fdd8c5eb (patch) | |
tree | f821e9bf930f8e264cb7e806d3d042801fd238ee | |
parent | 6b9c47ba408bd10b85cd87c1a61f919e38c2982f (diff) | |
parent | eee5bfc8b0d866eef2811b5f77917e05ee7bcee9 (diff) | |
download | vyatta-cfg-e8e69f6b02d92f165a9c468b65e35ad1fdd8c5eb.tar.gz vyatta-cfg-e8e69f6b02d92f165a9c468b65e35ad1fdd8c5eb.zip |
Merge branch 'glendale' of git:/git/vyatta-cfg into glendale
-rw-r--r-- | debian/control | 1 | ||||
-rwxr-xr-x | scripts/vyatta-config-loader.pl | 13 |
2 files changed, 9 insertions, 5 deletions
diff --git a/debian/control b/debian/control index 960e9a5..c359bcd 100644 --- a/debian/control +++ b/debian/control @@ -13,7 +13,6 @@ 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, diff --git a/scripts/vyatta-config-loader.pl b/scripts/vyatta-config-loader.pl index 93eb4d0..a870bf3 100755 --- a/scripts/vyatta-config-loader.pl +++ b/scripts/vyatta-config-loader.pl @@ -38,6 +38,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"); @@ -59,7 +64,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; } @@ -75,7 +80,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?) } @@ -86,14 +91,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?) } |