diff options
Diffstat (limited to 'main/sysklogd/sysklogd.daily')
-rwxr-xr-x | main/sysklogd/sysklogd.daily | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/main/sysklogd/sysklogd.daily b/main/sysklogd/sysklogd.daily index ccd63d61e4..6c5692ba3d 100755 --- a/main/sysklogd/sysklogd.daily +++ b/main/sysklogd/sysklogd.daily @@ -10,8 +10,8 @@ CONF="/etc/syslog.conf" syslogd_listfiles() { # List the target files from syslog.conf - local skip="auth" - [ "$1" = "--auth" ] && skip=" " + local skip= + [ "$1" = "--auth" ] && skip="!" # the while loop joins lines that end in "\" # the sed (in order)- @@ -19,14 +19,21 @@ syslogd_listfiles() { # collapses spaces/tabs to 1 space; # deletes the "-" in front of the filename; # deletes whitespace before ';' - # deletes lines that have the "skip" facility + # deletes lines that have/dont have the "auth" facility # deletes the facility (leaving just the filename) # deletes lines that are not filenames with leading "/" + # print it while read a ; do echo "$a"; done < $CONF |\ - sed -n "/^[ \t]*#/D; /^[ \t]*$/D; s/[ \t]\+/ /g; \ - s+ -/+ /+g; s/ *; */;/; /^.*\($skip\)[^ ]* /D; \ - s/^[^ ]* //; /^[^\\/]/D; P" |\ - sort | uniq + sed -n -e "s/\#.*//" \ + -e "/^\s*$/D" \ + -e "s/\s\+/ /g" \ + -e "s: -/: /:g" \ + -e "s/ *; */;/" \ + -e "/^.*\(auth\)[^ ]* /${skip}D" \ + -e "s:^.* /:/:" \ + -e "/^[^\\/]/D" \ + -e "P" \ + | sort | uniq } # dumb little savelog - no error checking here |