From owner-freebsd-current@FreeBSD.ORG Fri Feb 13 11:22:49 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AD59316A4CE for ; Fri, 13 Feb 2004 11:22:49 -0800 (PST) Received: from cheer.mahoroba.org (flets20-024.kamome.or.jp [218.45.20.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 30C3F43D2F for ; Fri, 13 Feb 2004 11:22:49 -0800 (PST) (envelope-from ume@mahoroba.org) Received: from lyrics.mahoroba.org (IDENT:5HDWHydkJHtyP6CuHrwOH+p6OMDtgYRqMggDDXvfuZvCg6DwJ2Guomjzprx20/R/@lyrics.mahoroba.org [IPv6:3ffe:501:185b:8010:280:88ff:fe03:4841]) (user=ume mech=CRAM-MD5 bits=0)i1DJMOZS088003 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 14 Feb 2004 04:22:27 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Sat, 14 Feb 2004 04:22:22 +0900 Message-ID: From: Hajimu UMEMOTO To: Rostislav Krasny In-Reply-To: <402CF9A4.90800@yahoo.com> References: <402CF9A4.90800@yahoo.com> User-Agent: xcite1.38> Wanderlust/2.11.3 (Wonderwall) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 Emacs/21.3 (i386--freebsd) MULE/5.0 (=?ISO-2022-JP?B?GyRCOC1MWhsoQg==?=) X-Operating-System: FreeBSD 5.2-CURRENT MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on cheer.mahoroba.org cc: freebsd-current@freebsd.org Subject: Re: etc/rc.d scripts: strange message about kvm_getprocs during restar X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Fri, 13 Feb 2004 19:22:49 -0000 Hi, >>>>> On Fri, 13 Feb 2004 18:21:56 +0200 >>>>> Rostislav Krasny said: rosti_bsd> When I run '/etc/rc.d/smth restart' I get a strange error message about rosti_bsd> kvm_getprocs: rosti_bsd> localhost# /etc/rc.d/inetd restart rosti_bsd> Stopping inetd. rosti_bsd> ps: kvm_getprocs: No such process rosti_bsd> Starting inetd. rosti_bsd> localhost# /etc/rc.d/syslogd restart rosti_bsd> Stopping syslogd. rosti_bsd> ps: kvm_getprocs: No such process rosti_bsd> Starting syslogd. rosti_bsd> localhost# rcNG expects that a pidfile is removed when a daemon exits. However, these daemons doesn't remove their pidfile. The following patch is for inetd: Index: etc/rc.d/inetd diff -u etc/rc.d/inetd.orig etc/rc.d/inetd --- etc/rc.d/inetd.orig Thu Feb 12 01:36:30 2004 +++ etc/rc.d/inetd Sat Feb 14 04:16:48 2004 @@ -16,6 +16,11 @@ pidfile="/var/run/${name}.pid" required_files="/etc/${name}.conf" extra_commands="reload" +stop_postcmd="inetd_poststop" + +inetd_poststop() { + /bin/rm -f ${pidfile} +} load_rc_config $name run_rc_command "$1" Sincerely, -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/