/usr/local/etc/rc.d/*.sh not working?

Daniel O'Connor doconnor at gsoft.com.au
Wed Jun 15 01:16:41 GMT 2005


On Wed, 15 Jun 2005 01:18, Vivek Khera wrote:
> On Jun 14, 2005, at 11:19 AM, Michael W. Lucas wrote:
> > For example, I have a server with about 400 separate MRTG daemons on
> > it.  (Yes, they must be separate, for administrative rather than
> > technical reasons.)  Each daemon has a custom script.  These aren't
> > ports, and they have no rcNG infrastructure.
>
> that many, eh...
>
> perhaps you're running into a shell command line limit somewhere
> which does something like
>
> foreach i (/usr/local/etc/rc.d/*.sh)
>
> and having that glob expansion blowing up in the shell.

find /usr/local/etc/rc.d -name \*.sh -exec {} start \;

Although old style scripts SHOULD work if it ends in .sh and is executable.

According to my reading of rc.subr - if they end in .sh they will be sourced 
in the current shell, otherwise they will be sourced in a subshell.. Dunno if 
that is affecting things (see run_rc_script)

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20050615/1d81f5a1/attachment-0001.bin


More information about the freebsd-stable mailing list