Date: Sat, 07 Jul 2012 16:08:18 +0400 From: Ilya A. Arkhipov <ruM1cRO@yandex.ru> To: freebsd-current@freebsd.org Subject: R flag in newsyslog works incorrect Message-ID: <782661341662898@web8f.yandex.ru>
index | next in thread | raw e-mail
[-- Attachment #1 --] Hi All, Looks as R flag with archiving works incorrect, for example: root@mhome:/tmp/test# less nsl.cfg /tmp/test/test.log micro:wheel 640 20 10 * BZR /tmp/test/test.sh root@mhome:/tmp/test# less test.sh echo atata root@mhome:/tmp/test# newsyslog -vF -f nsl.cfg Processing nsl.cfg /tmp/test/test.log <20Z>: size (Kb): 1 [10] --> trimming log.... Signal all daemon process(es)... Run command: /tmp/test/test.sh 1 atata Pause 10 seconds to allow daemon(s) to close log file(s) Compress all rotated log file(s)... newsyslog: log /tmp/test/test.log.0 not compressed because daemon(s) not notified http://micro.heavennet.ru/patch/newsyslog.patch fix it. root@mhome:/tmp/test# newsyslog -vF -f nsl.cfg Processing nsl.cfg /tmp/test/test.log <20Z>: size (Kb): 68 [10] --> trimming log.... Signal all daemon process(es)... Run command: /tmp/test/test.sh 1 atata Pause 10 seconds to allow daemon(s) to close log file(s) Compress all rotated log file(s)... Could you please review and fix it. Thanks in advance! -- With Best Regards, Ilya A. Arkhipov [-- Attachment #2 --] --- newsyslog.c_old 2012-07-07 14:49:41.502135608 +0000 +++ newsyslog.c 2012-07-07 14:48:09.425136998 +0000 @@ -1972,7 +1972,7 @@ else pgm_name++; - if (zwork->zw_swork != NULL && zwork->zw_swork->sw_pidok <= 0) { + if (zwork->zw_swork != NULL && zwork->zw_swork->sw_pidok <= 0 && !zwork->zw_swork->run_cmd ) { warnx( "log %s not compressed because daemon(s) not notified", zwork->zw_fname);help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?782661341662898>
