Subject: bin/31060: /etc/rc.d/ntpdate and virecover have "status" commands when they shouldn't
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <eravin@panix.com>
List: netbsd-bugs
Date: 08/24/2005 17:12:00
>Number: 31060
>Category: bin
>Synopsis: /etc/rc.d/ntpdate and virecover have "status" commands when they shouldn't
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Aug 24 17:12:00 +0000 2005
>Originator: Ed Ravin
>Release: 2.0
>Organization:
Public Access Networks
>Environment:
NetBSD panix5.panix.com 2.0 NetBSD 2.0 (PANIX-USER) #3: Thu Jan 13 20:20:38 EST
2005 root@trinity.nyc.access.net:/devel/netbsd/2.0/src/sys/arch/i386/compile/PANIX-USER i386
>Description:
The rc.d scrpts ntpdate and virecover, have "status" commands even though there is no running daemon associated with the startup script (the two scripts, like /etc/rc.d/network or /etc/rc.d/ldconfig, perform boot-time tasks and do not start any daemons). For example:
root@localhost ~: # /etc/rc.d/virecover status
virecover is not running.
It looks like this is happening because the variable "command"
is set in these scripts, and rc.subr, when it sees "command", assumes
there will be a running daemon.
>How-To-Repeat:
>Fix:
Don't use $command in those scripts - rename it to $onetimecommand
or the like.