diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-10-13 14:14:38 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-10-13 14:14:38 -0700 |
commit | 87e65021f2a105070cd44578a3d91bef8da2b8e1 (patch) | |
tree | 429374e641f3c43e7b90faa1bac6e435fa37c50e /templates/system/syslog/node.def | |
parent | 21403e009437db547a949c1a611fafcaf015ad37 (diff) | |
parent | facdd6ec66cb4b8eb45794f2b05cdc8d5bd2ed46 (diff) | |
download | vyatta-cfg-system-87e65021f2a105070cd44578a3d91bef8da2b8e1.tar.gz vyatta-cfg-system-87e65021f2a105070cd44578a3d91bef8da2b8e1.zip |
Merge branch 'islavista' of suva.vyatta.com:/git/vyatta-cfg-system into islavista
Diffstat (limited to 'templates/system/syslog/node.def')
-rw-r--r-- | templates/system/syslog/node.def | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/templates/system/syslog/node.def b/templates/system/syslog/node.def index 72a82d78..7fd911f7 100644 --- a/templates/system/syslog/node.def +++ b/templates/system/syslog/node.def @@ -1,3 +1,11 @@ -help: Set syslog daemon -delete:expression: "sudo sh -c \"/opt/vyatta/sbin/vyatta_update_syslog.pl \ -'' '\\/var\\/log\\/messages' '*.warning\t/var/log/messages \n'\" " +help: Configure syslog daemon +end: if [ -n "$VAR(./global/facility/@@)" ]; then + # remove the default config for global messages + sudo sh -c "sed -i '/\*\.notice[[: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[[:space:]]*-/var/log/messages" /etc/syslog.conf; then + sudo sh -c "echo \"*.notice -/var/log/messages\" >> /etc/syslog.conf" + fi + fi + sudo /usr/sbin/invoke-rc.d sysklogd restart |