diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-09-02 15:18:40 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-09-03 08:44:15 +0000 |
commit | 24dfddb1ce171455c39f58e7c1e10a73acdd910b (patch) | |
tree | 4282677f6fd7184d5093498baa63af0e383c3905 | |
parent | 49446e9ce3495ac7d844f28e030e8030568eb24b (diff) | |
download | alpine_aports-2.0.1.tar.bz2 alpine_aports-2.0.1.tar.xz alpine_aports-2.0.1.zip |
main/sysklogd: fix logrotation scriptv2.0.1
the syslogd_listfiles didnt handle the --auth option properly.
We fix this and make it slightly more readable with -e
ref #408
(cherry picked from commit 6c890d6e6624ff6debcfb070d1d7fa88db0bc4ad)
-rw-r--r-- | main/sysklogd/APKBUILD | 4 | ||||
-rwxr-xr-x | main/sysklogd/sysklogd.daily | 21 |
2 files changed, 16 insertions, 9 deletions
diff --git a/main/sysklogd/APKBUILD b/main/sysklogd/APKBUILD index 3e0fecdab1..43240eb47a 100644 --- a/main/sysklogd/APKBUILD +++ b/main/sysklogd/APKBUILD | |||
@@ -1,7 +1,7 @@ | |||
1 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> | 1 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> |
2 | pkgname=sysklogd | 2 | pkgname=sysklogd |
3 | pkgver=1.5 | 3 | pkgver=1.5 |
4 | pkgrel=6 | 4 | pkgrel=7 |
5 | pkgdesc="System and kernel log daemons" | 5 | pkgdesc="System and kernel log daemons" |
6 | url="http://www.infodrom.org/projects/sysklogd/" | 6 | url="http://www.infodrom.org/projects/sysklogd/" |
7 | license="GPL BSD" | 7 | license="GPL BSD" |
@@ -48,7 +48,7 @@ build () | |||
48 | } | 48 | } |
49 | md5sums="e053094e8103165f98ddafe828f6ae4b sysklogd-1.5.tar.gz | 49 | md5sums="e053094e8103165f98ddafe828f6ae4b sysklogd-1.5.tar.gz |
50 | 6bc1d1c65076b104a8f78d0fb4f21db7 sysklogd.logrotate | 50 | 6bc1d1c65076b104a8f78d0fb4f21db7 sysklogd.logrotate |
51 | 5ba669cf356796bdef20962a143eca72 sysklogd.daily | 51 | d66d2ad2c4d0905b42963af9e86edacb sysklogd.daily |
52 | e4c9a51499f1eb8d45dfdfe0d52737a5 sysklogd.initd | 52 | e4c9a51499f1eb8d45dfdfe0d52737a5 sysklogd.initd |
53 | e25d7b583b7e4bd8be503b89e1771e90 sysklogd.confd | 53 | e25d7b583b7e4bd8be503b89e1771e90 sysklogd.confd |
54 | 3b7ba3aa6519f96f11165a7d5900a8b1 sysklogd-1.4.2-caen-owl-klogd-drop-root.diff | 54 | 3b7ba3aa6519f96f11165a7d5900a8b1 sysklogd-1.4.2-caen-owl-klogd-drop-root.diff |
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" | |||
10 | syslogd_listfiles() { | 10 | syslogd_listfiles() { |
11 | # List the target files from syslog.conf | 11 | # List the target files from syslog.conf |
12 | 12 | ||
13 | local skip="auth" | 13 | local skip= |
14 | [ "$1" = "--auth" ] && skip=" " | 14 | [ "$1" = "--auth" ] && skip="!" |
15 | 15 | ||
16 | # the while loop joins lines that end in "\" | 16 | # the while loop joins lines that end in "\" |
17 | # the sed (in order)- | 17 | # the sed (in order)- |
@@ -19,14 +19,21 @@ syslogd_listfiles() { | |||
19 | # collapses spaces/tabs to 1 space; | 19 | # collapses spaces/tabs to 1 space; |
20 | # deletes the "-" in front of the filename; | 20 | # deletes the "-" in front of the filename; |
21 | # deletes whitespace before ';' | 21 | # deletes whitespace before ';' |
22 | # deletes lines that have the "skip" facility | 22 | # deletes lines that have/dont have the "auth" facility |
23 | # deletes the facility (leaving just the filename) | 23 | # deletes the facility (leaving just the filename) |
24 | # deletes lines that are not filenames with leading "/" | 24 | # deletes lines that are not filenames with leading "/" |
25 | # print it | ||
25 | while read a ; do echo "$a"; done < $CONF |\ | 26 | while read a ; do echo "$a"; done < $CONF |\ |
26 | sed -n "/^[ \t]*#/D; /^[ \t]*$/D; s/[ \t]\+/ /g; \ | 27 | sed -n -e "s/\#.*//" \ |
27 | s+ -/+ /+g; s/ *; */;/; /^.*\($skip\)[^ ]* /D; \ | 28 | -e "/^\s*$/D" \ |
28 | s/^[^ ]* //; /^[^\\/]/D; P" |\ | 29 | -e "s/\s\+/ /g" \ |
29 | sort | uniq | 30 | -e "s: -/: /:g" \ |
31 | -e "s/ *; */;/" \ | ||
32 | -e "/^.*\(auth\)[^ ]* /${skip}D" \ | ||
33 | -e "s:^.* /:/:" \ | ||
34 | -e "/^[^\\/]/D" \ | ||
35 | -e "P" \ | ||
36 | | sort | uniq | ||
30 | } | 37 | } |
31 | 38 | ||
32 | # dumb little savelog - no error checking here | 39 | # dumb little savelog - no error checking here |