etc/rc.d scripts: strange message about kvm_getprocs during
restar
Hajimu UMEMOTO
ume at mahoroba.org
Fri Feb 13 11:22:49 PST 2004
Hi,
>>>>> On Fri, 13 Feb 2004 18:21:56 +0200
>>>>> Rostislav Krasny <rosti_bsd at 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 at mahoroba.org ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/
More information about the freebsd-current
mailing list