From owner-freebsd-current@FreeBSD.ORG Sat Jul 7 12:08:20 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 70ADE1065673 for ; Sat, 7 Jul 2012 12:08:20 +0000 (UTC) (envelope-from ruM1cRO@yandex.ru) Received: from forward14.mail.yandex.net (forward14.mail.yandex.net [IPv6:2a02:6b8:0:801::4]) by mx1.freebsd.org (Postfix) with ESMTP id DAB008FC08 for ; Sat, 7 Jul 2012 12:08:19 +0000 (UTC) Received: from web8f.yandex.ru (web8f.yandex.ru [95.108.130.105]) by forward14.mail.yandex.net (Yandex) with ESMTP id 8037D198134F for ; Sat, 7 Jul 2012 16:08:18 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1341662898; bh=jAeku1AMJ5lE6GzBtpZMkqqDUdt4muc4OeyrX590j0c=; h=From:To:Subject:MIME-Version:Message-Id:Date:Content-Type; b=KUBb0qfLHOj54yovWcYrQFA9jMyVF9Vy8p59DBiOWAGLKKh5R72f07UxfO/m7BO0t lTb9O+g943LdvM/wWUL0HOjjiGEYBI9l3QXm75CWEGTmmL4bP/kqwUXmz0RlAUM6Y4 GwAMABaG3oSii3j8NyLmVFZbJ4TjaIJZj7FbLOE8= Received: from 127.0.0.1 (localhost.localdomain [127.0.0.1]) by web8f.yandex.ru (Yandex) with ESMTP id 4C26B5290037; Sat, 7 Jul 2012 16:08:18 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1341662898; bh=jAeku1AMJ5lE6GzBtpZMkqqDUdt4muc4OeyrX590j0c=; h=From:To:Subject:MIME-Version:Message-Id:Date:Content-Type; b=KUBb0qfLHOj54yovWcYrQFA9jMyVF9Vy8p59DBiOWAGLKKh5R72f07UxfO/m7BO0t lTb9O+g943LdvM/wWUL0HOjjiGEYBI9l3QXm75CWEGTmmL4bP/kqwUXmz0RlAUM6Y4 GwAMABaG3oSii3j8NyLmVFZbJ4TjaIJZj7FbLOE8= Received: from 95-24-196-236.broadband.corbina.ru (95-24-196-236.broadband.corbina.ru [95.24.196.236]) by web8f.yandex.ru with HTTP; Sat, 07 Jul 2012 16:08:18 +0400 From: Ilya A. Arkhipov To: freebsd-current@freebsd.org MIME-Version: 1.0 Message-Id: <782661341662898@web8f.yandex.ru> Date: Sat, 07 Jul 2012 16:08:18 +0400 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Content-Type: multipart/mixed; boundary="----==--bound.78267.web8f.yandex.ru" X-Mailman-Approved-At: Sat, 07 Jul 2012 12:10:28 +0000 Subject: R flag in newsyslog works incorrect X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2012 12:08:20 -0000 ------==--bound.78267.web8f.yandex.ru Content-Transfer-Encoding: 7bit Content-Type: text/plain 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 ------==--bound.78267.web8f.yandex.ru Content-Disposition: attachment; filename="newsyslog.patch" Content-Transfer-Encoding: base64 Content-Type: text/plain; name="newsyslog.patch" LS0tIG5ld3N5c2xvZy5jX29sZAkyMDEyLTA3LTA3IDE0OjQ5OjQxLjUwMjEzNTYwOCArMDAwMAor KysgbmV3c3lzbG9nLmMJMjAxMi0wNy0wNyAxNDo0ODowOS40MjUxMzY5OTggKzAwMDAKQEAgLTE5 NzIsNyArMTk3Miw3IEBACiAJZWxzZQogCQlwZ21fbmFtZSsrOwogCi0JaWYgKHp3b3JrLT56d19z d29yayAhPSBOVUxMICYmIHp3b3JrLT56d19zd29yay0+c3dfcGlkb2sgPD0gMCkgeworCWlmICh6 d29yay0+endfc3dvcmsgIT0gTlVMTCAmJiB6d29yay0+endfc3dvcmstPnN3X3BpZG9rIDw9IDAg JiYgIXp3b3JrLT56d19zd29yay0+cnVuX2NtZCApIHsKIAkJd2FybngoCiAJCSAgICAibG9nICVz IG5vdCBjb21wcmVzc2VkIGJlY2F1c2UgZGFlbW9uKHMpIG5vdCBub3RpZmllZCIsCiAJCSAgICB6 d29yay0+endfZm5hbWUpOwo= ------==--bound.78267.web8f.yandex.ru--