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>
pkgname=sysklogd
pkgver=1.5
pkgrel=4
pkgrel=6
pkgdesc="System and kernel log daemons"
url="http://www.infodrom.org/projects/sysklogd/"
license="GPL BSD"
......
......@@ -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
}
......
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