diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-04-06 21:32:29 -0700 |
---|---|---|
committer | Stephen Hemminger <shemminger@vyatta.com> | 2009-04-08 15:33:37 -0700 |
commit | 3f6410042b54db636eac390657a8a35583515ce4 (patch) | |
tree | 53d912db2b97adce4ac22f09abd4686a305885b5 /templates/system/syslog/node.def | |
parent | b565e19b831a92a054e9281624f51482d3d9566e (diff) | |
download | vyatta-cfg-system-3f6410042b54db636eac390657a8a35583515ce4.tar.gz vyatta-cfg-system-3f6410042b54db636eac390657a8a35583515ce4.zip |
Rewrite existing syslog configuration update
Do most of the work in the rewritten vyatta_update_syslog code.
Handle multiple facilities for same target without causing duplicate
log messages.
Never restart syslog daemon, just reload it and only if the configuration
has changed.
Diffstat (limited to 'templates/system/syslog/node.def')
-rw-r--r-- | templates/system/syslog/node.def | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/templates/system/syslog/node.def b/templates/system/syslog/node.def index 6bca3490..9e3254e1 100644 --- a/templates/system/syslog/node.def +++ b/templates/system/syslog/node.def @@ -1,11 +1,4 @@ help: Configure syslog daemon -end: if [ -n "$VAR(./global/facility/@@)" ]; then - # remove the default config for global messages - sudo sh -c "sed -i '/\*\.notice;local7\.\*[[:space:]]*-\/var\/log\/messages/d' /etc/syslog.conf" - else - # if not already there then write the default config for global messages - if ! grep -q "\*\.notice;local7\.\*[[:space:]]*-/var/log/messages" /etc/syslog.conf; then - sudo sh -c "echo \"*.notice;local7.* -/var/log/messages\" >> /etc/syslog.conf" - fi +end: if /opt/vyatta/sbin/vyatta_update_syslog.pl; then + sudo /usr/sbin/invoke-rc.d sysklogd reload fi - sudo /usr/sbin/invoke-rc.d sysklogd restart |