diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-12-08 15:56:26 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-12-08 15:57:51 +0000 |
commit | 1a27133d79e1de4818ccc4323bb7223680e2725c (patch) | |
tree | ee322d3db43fffbe0bc725e91eaf62ab8f409855 /main/sysklogd/sysklogd.daily | |
parent | a946e1cdc42ee7b7f804f46b818e029a2d7856cb (diff) | |
download | aports-1a27133d79e1de4818ccc4323bb7223680e2725c.tar.bz2 aports-1a27133d79e1de4818ccc4323bb7223680e2725c.tar.xz |
main/sysklogd: fix log rotating
ref #408
Diffstat (limited to 'main/sysklogd/sysklogd.daily')
-rwxr-xr-x | main/sysklogd/sysklogd.daily | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/main/sysklogd/sysklogd.daily b/main/sysklogd/sysklogd.daily index 6c5692ba3d..723413d4d5 100755 --- a/main/sysklogd/sysklogd.daily +++ b/main/sysklogd/sysklogd.daily @@ -15,18 +15,19 @@ syslogd_listfiles() { # the while loop joins lines that end in "\" # the sed (in order)- - # strips comments; - # collapses spaces/tabs to 1 space; + # strips comments; + # remove empty lines; + # collapses spaces/tabs to 1 space; # deletes the "-" in front of the filename; # deletes whitespace before ';' # deletes lines that have/dont have the "auth" facility # deletes the facility (leaving just the filename) - # deletes lines that are not filenames with leading "/" + # deletes lines that are not filenames with leading "/" # print it while read a ; do echo "$a"; done < $CONF |\ sed -n -e "s/\#.*//" \ - -e "/^\s*$/D" \ - -e "s/\s\+/ /g" \ + -e "/^[[:space:]]*$/D" \ + -e "s/[[:space:]]\+/ /g" \ -e "s: -/: /:g" \ -e "s/ *; */;/" \ -e "/^.*\(auth\)[^ ]* /${skip}D" \ |