Re: rcrun reload

2011-02-04 Thread Chris Turner

Pierre Abbat wrote:
I modified a script so that it takes the reload argument, which the program 
supports, and then tried to use it:

...

How come rcrun reload doesn't work?


looks like rcrun itself doesn't support reload -

 usage: rcrun
 start|stop|restart|rcvar|list|forcestart|faststart|disable|enable

I'd suggest using either the 'restart' target or maybe 'faststart'
in your tor rc script to do the reload -
alternately you could of course run:

/etc/rc.d/tor reload

directly as you demonstrated.

the rc scripts themselves are shell scripts so the usual

sh -x script args

to trace execution, etc. should apply -

for example:

sh -x /sbin/rcrun reload tor

to see the details of the particular error you saw

main ones are /sbin/rcrun as you have found,
/etc/rc, and /etc/rc.subr (common subroutines)

of course the usual rc, rc.conf, rcorder, rcrun,
etc. manual pages are a good place to look as well
as of course the dragonfly handbook

http://www.dragonflybsd.org/docs/handbook/handbook-configtuning-rcng/

although the associated 'rcrun' managment scripts
are a dragonfly creation, The rc.d infrastructure
originally comes from NetBSD -
which has some good docs which are mostly applicable -

http://www.netbsd.org/docs/guide/en/chap-rc.html

there's also a PDF about the design as well as the
evolution / history from which is quite excellent
in the above URL

ok. I stop the blabbing. As someone who has had
to try and package SysV init S  K softlinkk configurations,
I get a bit exited about rcng and tend to ramble.

cheers and good luck

- Chris




rcrun reload

2011-02-03 Thread Pierre Abbat
I modified a script so that it takes the reload argument, which the program 
supports, and then tried to use it:

# pwd
/etc/rc.d
# ./tor reload
Reloading tor config files.
# rcrun reload tor
usage: rcrun start|stop|restart|rcvar|list|forcestart|faststart|disable|enable
 script ...

How come rcrun reload doesn't work?

Pierre
-- 
Jews use a lunisolar calendar; Muslims use a solely lunar calendar.