aboutsummaryrefslogtreecommitdiffstats
path: root/main/sysklogd/sysklogd.daily
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2010-06-11 15:10:46 +0300
committerTimo Teräs <timo.teras@iki.fi>2010-06-11 15:11:31 +0300
commitf29fb9c595a8147b34c334cccc254a77b10b8a6e (patch)
tree30c191ae45f4793c7fee64ed8881fc0e45a28713 /main/sysklogd/sysklogd.daily
parent5b5a67b0cc5f016c1fe0ba86236a4b599298026c (diff)
downloadaports-f29fb9c595a8147b34c334cccc254a77b10b8a6e.tar.bz2
aports-f29fb9c595a8147b34c334cccc254a77b10b8a6e.tar.xz
main/sysklogd: fix rotation of log files
fixes #358
Diffstat (limited to 'main/sysklogd/sysklogd.daily')
-rwxr-xr-xmain/sysklogd/sysklogd.daily7
1 files changed, 4 insertions, 3 deletions
diff --git a/main/sysklogd/sysklogd.daily b/main/sysklogd/sysklogd.daily
index 79e85fb468..ccd63d61e4 100755
--- a/main/sysklogd/sysklogd.daily
+++ b/main/sysklogd/sysklogd.daily
@@ -17,13 +17,14 @@ syslogd_listfiles() {
# the sed (in order)-
# strips comments;
# collapses spaces/tabs to 1 space;
- # deletes the "-" in front of the filename;
+ # deletes the "-" in front of the filename;
+ # deletes whitespace before ';'
# deletes lines that have the "skip" facility
# deletes the facility (leaving just the filename)
# deletes lines that are not filenames with leading "/"
while read a ; do echo "$a"; done < $CONF |\
- sed -n "/^ *#/D; /^[ ]*$/D; s/[ ]\+/ /g; \
- s+ -/+ /+g; /^.*\($skip\)[^ ]* /D; \
+ sed -n "/^[ \t]*#/D; /^[ \t]*$/D; s/[ \t]\+/ /g; \
+ s+ -/+ /+g; s/ *; */;/; /^.*\($skip\)[^ ]* /D; \
s/^[^ ]* //; /^[^\\/]/D; P" |\
sort | uniq
}