From owner-freebsd-stable@FreeBSD.ORG Wed Jun 15 05:06:24 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 881F916A41F for ; Wed, 15 Jun 2005 05:06:24 +0000 (GMT) (envelope-from ertr1013@student.uu.se) Received: from pne-smtpout2-sn1.fre.skanova.net (pne-smtpout2-sn1.fre.skanova.net [81.228.11.159]) by mx1.FreeBSD.org (Postfix) with ESMTP id 21ACF43D53 for ; Wed, 15 Jun 2005 05:06:23 +0000 (GMT) (envelope-from ertr1013@student.uu.se) Received: from falcon.midgard.homeip.net (212.181.162.201) by pne-smtpout2-sn1.fre.skanova.net (7.2.059.6) id 42930AA9004E288D for freebsd-stable@freebsd.org; Wed, 15 Jun 2005 07:06:22 +0200 Received: (qmail 51592 invoked by uid 1001); 15 Jun 2005 07:06:21 +0200 Date: Wed, 15 Jun 2005 07:06:21 +0200 From: Erik Trulsson To: Daniel O'Connor Message-ID: <20050615050621.GA50123@falcon.midgard.homeip.net> Mail-Followup-To: Daniel O'Connor , freebsd-stable@freebsd.org, Vivek Khera , stable@freebsd.org References: <20050614150240.GA62949@bewilderbeast.blackhelicopters.org> <20050614151939.GA63065@bewilderbeast.blackhelicopters.org> <6E39C810-AA1D-43AA-B2FA-CA8C387141CF@khera.org> <200506151046.23079.doconnor@gsoft.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200506151046.23079.doconnor@gsoft.com.au> User-Agent: Mutt/1.5.9i Cc: Vivek Khera , stable@freebsd.org, freebsd-stable@freebsd.org Subject: Re: /usr/local/etc/rc.d/*.sh not working? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2005 05:06:24 -0000 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. -- Erik Trulsson ertr1013@student.uu.se