I had a similar problem when writing my own rc.d start script for Snort (compiled instead of package version), and it turned out to be becuase the rc.d script did not implicity incude the variables in 'rc.conf.local' and 'rc.conf' any more.
So I just added the following to the top of the rc.d script; if [ -e /etc/rc.conf.local ]; then . /etc/rc.conf.local fi In versions of OBSD prior to 5.2 this worked, but after 5.2 I had to start explicitly including the rc.conf files. This probably isn't your issue but is still something to consider. Specifically 'rc_check' runs 'pkill -0 -f "^${pexp}"' to test to see of the binary is running, and I found I had to tweak the 'pexp' string to match my snort2pf process properly with 'perl: snort2pf' (I.e. I had to include the perl bit too as the regular expression states 'starts with' due to the leading '^'). Hope this is useful. Andrew Lemin On 22/05/13 08:02, Antoine Jacoutot wrote: > On Wed, May 22, 2013 at 06:57:16AM +0000, C. L. Martinez wrote: >> On Wed, May 22, 2013 at 6:50 AM, Antoine Jacoutot <ajacou...@bsdfrog.org> >> wrote: >>> On Wed, May 22, 2013 at 06:18:04AM +0000, C. L. Martinez wrote: >>>> Hi all, >>>> >>>> I have a problem with some tcl rc.d startup scripts. Start and status >>> You mean check instead of status, right? >> Yep, you are rigth Antoine .. >> >>>> works ok but stop and restart, doesn't. >>> Running the rc script in debug mode may give you some clue (-d). >>> >> >> Uhmm .. no clues: >> >> /usr/local/etc/rc.d/suricata_proxyin_agent -d stop >> >> + [ -n /usr/local/bin/suricata_proxyin_agent.tcl ] >> + unset _RC_DEBUG _RC_FORCE >> + getopts df c >> + _RC_DEBUG=-d >> + getopts df c >> + shift 1 >> + basename /usr/local/etc/rc.d/suricata_proxyin_agent >> + _name=suricata_proxyin_agent >> + _RC_RUNDIR=/var/run/rc.d >> + _RC_RUNFILE=/var/run/rc.d/suricata_proxyin_agent >> + eval _rcflags=${suricata_proxyin_agent_flags} >> + _rcflags= >> + eval _rcuser=${suricata_proxyin_agent_user} >> + _rcuser= >> + getcap -f /etc/login.conf suricata_proxyin_agent >> + > /dev/null >> + 2>&1 >> + [ -z ] >> + daemon_class=daemon >> + [ -z ] >> + daemon_user=root >> + [ -n ] >> + [ -n ] >> + [ -n ] >> + printf %s -c /data/config/etc/sguil/suricata_proxyin_agent.conf -D >> + daemon_flags= -c /data/config/etc/sguil/suricata_proxyin_agent.conf -D >> + daemon_flags=-c /data/config/etc/sguil/suricata_proxyin_agent.conf -D >> + readonly daemon_class >> + unset _rcflags _rcuser >> + pexp=/usr/local/bin/suricata_proxyin_agent.tcl -c >> /data/config/etc/sguil/suricata_proxyin_agent.conf -D >> + rcexec=su -l -c daemon -s /bin/sh root -c >> + pexp=/usr/local/bin/tclsh8.5 /usr/local/bin/suricata_proxyin_agent.tcl >> + rc_cmd stop >> doing rc_read_runfile >> doing rc_check > Well it seems to stop at rc_check. > Maybe the pexp doesn't match. > >> Nothing strange here ...