Question about rc-scripts

Stephen Allen sdafreebsduk at rowyerboat.com
Mon Oct 8 15:45:25 PDT 2007


Under normal circumstance, should the /etc/rc.subr functions handle the
creation of the pid at service start?

The basic vendor-provided script (which I've had to adapt somewhat to
suit this installation) runs "echo $! > ${dbgw_pidfile}" as the last
line of the script.  When you do a 'status' command though, it blanks
out the contents of the pid.  That echo line isn't present in any of the
standard scripts - hence my initial question.

Apart from variable assignments, the script defines 'start_cmd' (which I
assume is used as the start command by rc.subr).  Strange that I
couldn't find any reference to start_cmd in /etc/rc.subr though.

So, my question is, why isn't the pidfile being automagically created?

Many thanks,
Steve



More information about the freebsd-questions mailing list