From owner-freebsd-bugs Thu Jan 9 3:10: 6 2003 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3371A37B401 for ; Thu, 9 Jan 2003 03:10:04 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3276443F5B for ; Thu, 9 Jan 2003 03:10:03 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h09BA2NS032685 for ; Thu, 9 Jan 2003 03:10:02 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h09BA28c032684; Thu, 9 Jan 2003 03:10:02 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EFE7F37B401 for ; Thu, 9 Jan 2003 03:04:21 -0800 (PST) Received: from myvision.it (morettoni.net [213.213.67.165]) by mx1.FreeBSD.org (Postfix) with SMTP id 63B5943ED8 for ; Thu, 9 Jan 2003 03:04:20 -0800 (PST) (envelope-from luca@morettoni.net) Received: (qmail 88594 invoked by uid 85); 9 Jan 2003 11:04:02 -0000 Received: from unknown (HELO ) (213.255.95.186) by 0 with SMTP; 9 Jan 2003 11:04:01 -0000 Received: (qmail 4703 invoked by uid 1001); 9 Jan 2003 11:02:20 -0000 Message-Id: <20030109110220.4702.qmail@morettoni.net> Date: 9 Jan 2003 11:02:20 -0000 From: User & Reply-To: User & To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/46888: Add script run hook to newsyslog(8) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 46888 >Category: bin >Synopsis: Add script run hook to newsyslog(8) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Jan 09 03:10:02 PST 2003 >Closed-Date: >Last-Modified: >Originator: Luca Morettoni >Release: FreeBSD 4.7-RELEASE-p2 i386 >Organization: Luca Morettoni >Environment: System: FreeBSD luca.aerre.biz 4.7-RELEASE-p2 FreeBSD 4.7-RELEASE-p2 #0: Thu Dec 12 20:24:14 CET 2002 root@luca.aerre.biz:/usr/obj/usr/src/sys/LUCA i386 >Description: This add to newsyslog the hook to run a user script after a log was archivied instead send a signal to a daemon. This is usefull for the program that don't handle signals for flushing logs (MySql for example). To use this feature, set path_to_pif field in newsyslog.conf to the complete pathname of the executable, prepended by a ! character (example: !/path_to_script). The script is run only if: - is user executable - is owned by root (unless -r option is used) - isn't group and world writable I hope you enjoy this patch, and if there's some change to do, I'm here to help you (and FreeBSD too!) Excuse for my very bad English! >How-To-Repeat: >Fix: For src/usr/sbin/newsyslog: http://morettoni.net/bsd/newsyslog.c.diffs http://morettoni.net/bsd/newsyslog.8.diffs For src/etc: http://morettoni.net/bsd/newsyslog.conf.diffs >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message