Date: Wed, 15 Jun 2005 07:06:21 +0200 From: Erik Trulsson <ertr1013@student.uu.se> To: Daniel O'Connor <doconnor@gsoft.com.au> Cc: Vivek Khera <vivek@khera.org>, stable@freebsd.org, freebsd-stable@freebsd.org Subject: Re: /usr/local/etc/rc.d/*.sh not working? Message-ID: <20050615050621.GA50123@falcon.midgard.homeip.net> In-Reply-To: <200506151046.23079.doconnor@gsoft.com.au> References: <20050614150240.GA62949@bewilderbeast.blackhelicopters.org> <20050614151939.GA63065@bewilderbeast.blackhelicopters.org> <6E39C810-AA1D-43AA-B2FA-CA8C387141CF@khera.org> <200506151046.23079.doconnor@gsoft.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 15, 2005 at 10:46:22AM +0930, Daniel O'Connor wrote: > 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 \; For only 400 scripts there should not be any problem with glob expansion (unless all the scripts have extremely long filenames.) For 4000 scripts I would not be surprised if there were problems with glob expansion, but that should not happen for a mere 400 scripts. > > 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) By my reading of rc.subr, that is only true for scripts in /etc/rc.d/ The scripts in /usr/local/etc/rc.d/ are started by /etc/rc.d/localpkg and are always run in a subshell. Old style scripts in /usr/local/etc/rc.d/ should work just the same as before. -- <Insert your favourite quote here.> Erik Trulsson ertr1013@student.uu.se
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050615050621.GA50123>