Commit 5e24e264 authored by Timo Teräs's avatar Timo Teräs Committed by Natanael Copa

main/sysklogd: fix rotation of log files

fixes #358
parent caba6544
# Maintainer: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sysklogd pkgname=sysklogd
pkgver=1.5 pkgver=1.5
pkgrel=4 pkgrel=6
pkgdesc="System and kernel log daemons" pkgdesc="System and kernel log daemons"
url="http://www.infodrom.org/projects/sysklogd/" url="http://www.infodrom.org/projects/sysklogd/"
license="GPL BSD" license="GPL BSD"
......
...@@ -17,13 +17,14 @@ syslogd_listfiles() { ...@@ -17,13 +17,14 @@ syslogd_listfiles() {
# the sed (in order)- # the sed (in order)-
# strips comments; # strips comments;
# collapses spaces/tabs to 1 space; # 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 lines that have the "skip" facility
# deletes the facility (leaving just the filename) # deletes the facility (leaving just the filename)
# deletes lines that are not filenames with leading "/" # deletes lines that are not filenames with leading "/"
while read a ; do echo "$a"; done < $CONF |\ while read a ; do echo "$a"; done < $CONF |\
sed -n "/^ *#/D; /^[ ]*$/D; s/[ ]\+/ /g; \ sed -n "/^[ \t]*#/D; /^[ \t]*$/D; s/[ \t]\+/ /g; \
s+ -/+ /+g; /^.*\($skip\)[^ ]* /D; \ s+ -/+ /+g; s/ *; */;/; /^.*\($skip\)[^ ]* /D; \
s/^[^ ]* //; /^[^\\/]/D; P" |\ s/^[^ ]* //; /^[^\\/]/D; P" |\
sort | uniq sort | uniq
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment