Date: Sat, 14 Feb 2004 04:22:22 +0900 From: Hajimu UMEMOTO <ume@mahoroba.org> To: Rostislav Krasny <rosti_bsd@yahoo.com> Cc: freebsd-current@freebsd.org Subject: Re: etc/rc.d scripts: strange message about kvm_getprocs during restar Message-ID: <ygeznbm4wep.wl%ume@mahoroba.org> In-Reply-To: <402CF9A4.90800@yahoo.com> References: <402CF9A4.90800@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi,
>>>>> On Fri, 13 Feb 2004 18:21:56 +0200
>>>>> Rostislav Krasny <rosti_bsd@yahoo.com> 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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ygeznbm4wep.wl%ume>
