From jaitken@wingnut.syntunix.com  Mon Jun  1 11:45:37 1998
Received: from wingnut.syntunix.com (cojones.syntunix.com [209.12.7.139] (may be forged))
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA02633
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 1 Jun 1998 11:45:36 -0700 (PDT)
          (envelope-from jaitken@wingnut.syntunix.com)
Received: (from jaitken@localhost)
	by wingnut.syntunix.com (8.8.8/8.8.8) id OAA00367;
	Mon, 1 Jun 1998 14:45:06 -0400 (EDT)
	(envelope-from jaitken)
Message-Id: <199806011845.OAA00367@wingnut.syntunix.com>
Date: Mon, 1 Jun 1998 14:45:06 -0400 (EDT)
From: Jeff Aitken <jaitken@wingnut.syntunix.com>
Reply-To: jaitken@wingnut.syntunix.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: local_startup section of /etc/rc
X-Send-Pr-Version: 3.2

>Number:         6818
>Category:       misc
>Synopsis:       startup scripts must have .sh extension
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun  1 11:50:01 PDT 1998
>Closed-Date:    Tue Jun 2 04:16:54 PDT 1998
>Last-Modified:  Tue Jun  2 04:17:06 PDT 1998
>Originator:     Jeff Aitken
>Release:        FreeBSD 2.2.6-RELEASE i386
>Organization:
Dimension Enterprises, Inc.
>Environment:

	Standard FreeBSD-2.2.6-RELEASE installation.

>Description:

	Near the end of /etc/rc, the system goes through each 
	directory listed in the 'local_startup' rc.conf variable.
	It looks for files ending in .sh and executes them (if
	they are executable).

	The restriction that system startup scripts end in .sh
	is silly.  

>How-To-Repeat:

	Put a perfectly valid startup script that doesn't end in
	.sh in /usr/local/etc/rc.d and reboot. :-)

>Fix:
	
*** rc.dist	Mon Jun  1 14:40:35 1998
--- rc	Mon Jun  1 14:34:06 1998
***************
*** 306,312 ****
  if [ "X${local_startup}" != X"NO" ]; then
  	echo -n 'Local package initialization:'
  	for dir in ${local_startup}; do
! 		[ -d ${dir} ] && for script in ${dir}/*.sh; do
  			[ -x ${script} ] && ${script} start
  		done
  	done
--- 306,312 ----
  if [ "X${local_startup}" != X"NO" ]; then
  	echo -n 'Local package initialization:'
  	for dir in ${local_startup}; do
! 		[ -d ${dir} ] && for script in ${dir}/*; do
  			[ -x ${script} ] && ${script} start
  		done
  	done

>Release-Note:
>Audit-Trail:

From: "Jordan K. Hubbard" <jkh@time.cdrom.com>
To: jaitken@wingnut.syntunix.com
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: misc/6818: local_startup section of /etc/rc 
Date: Mon, 01 Jun 1998 12:42:14 -0700

 > 	The restriction that system startup scripts end in .sh
 > 	is silly.  
 
 No, it's not silly, it allows you to put other files there like
 documentation files or a README describing (to the next admin
 to come along) some of these weird packages you're starting
 up and why.
 
 - Jordan

From: Jeff Aitken <jaitken@dimension.net>
To: jkh@time.cdrom.com (Jordan K. Hubbard)
Cc: jaitken@wingnut.syntunix.com, FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: misc/6818: local_startup section of /etc/rc
Date: Mon, 1 Jun 1998 16:24:09 -0400 (EDT)

 Jordan K. Hubbard writes:
 > > 	The restriction that system startup scripts end in .sh
 > > 	is silly.  
 > 
 > No, it's not silly, it allows you to put other files there like
 > documentation files or a README describing (to the next admin
 > to come along) some of these weird packages you're starting
 > up and why.
 
 
 Why not just run everything that's executable?  README's and
 documentation generally isn't executable, right?
 
 I guess I've actually started to get used to "intelligent" SYS-V
 style startup procedures like HP-UX has (or Digital UNIX, to a
 slightly lesser extent), where the startup script is named after
 the daemon where possible, or is obviously named (e.g., 
 /sbin/init.d/nfs.server). 
 
 I also like the idea of the 'start_msg' and 'stop_msg' parameters on
 HP-UX; to my way of thinking, they give you enough documentation. ;-) ;-)
 
 Anyway, just my $.02, after I spent 15 minutes trying to figure out
 why my damn sshd script wasn't being run. :-)
 
 
 --Jeff
 

From: Matthew Hunt <mph@pobox.com>
To: jaitken@wingnut.syntunix.com, FreeBSD-gnats-submit@freebsd.org
Cc:  Subject: Re: misc/6818: local_startup section of /etc/rc
Date: Mon, 1 Jun 1998 16:30:14 -0400

 On Mon, Jun 01, 1998 at 02:45:06PM -0400, Jeff Aitken wrote:
 
 > 	The restriction that system startup scripts end in .sh
 > 	is silly.  
 
 Hm, I always took advantage of it by doing "mv foo.sh foo.sh.disabled"
 to keep one from running.  I suppose "chmod -x" would be just as well,
 but whether the current behavior is a bug or a feature, I've been
 taking advantage of it...
 
 -- 
 Matthew Hunt <mph@pobox.com> * Stay close to the Vorlon.
 http://mph124.rh.psu.edu/~mph/pgp.key for PGP public key 0x67203349.

From: Jeff Aitken <jaitken@dimension.net>
To: mph@pobox.com (Matthew Hunt)
Cc: jaitken@wingnut.syntunix.com, FreeBSD-gnats-submit@freebsd.org
Subject: Re: misc/6818: local_startup section of /etc/rc
Date: Mon, 1 Jun 1998 17:06:12 -0400 (EDT)

 Matthew Hunt writes:
 > On Mon, Jun 01, 1998 at 02:45:06PM -0400, Jeff Aitken wrote:
 > 
 > > 	The restriction that system startup scripts end in .sh
 > > 	is silly.  
 > 
 > Hm, I always took advantage of it by doing "mv foo.sh foo.sh.disabled"
 > to keep one from running.  I suppose "chmod -x" would be just as well,
 > but whether the current behavior is a bug or a feature, I've been
 > taking advantage of it...
 
 
 This probably isn't the right place to continue this, but...
 
 One answer is the SYS-V way of doing it (I generally shudder at the
 thought of most SYS-V behavior, but I genuinely find this useful ;-).
 FreeBSD is kind of a hybrid between the old BSD style and the SYSV
 style, which means it doesn't fit nicely in either.
 
 In SYSV land, all you have to do is remove the appropriate Snn
 symlink, or (on even more intelligent systems) make the appropriate
 change in /etc/rc.config (or /etc/rc.config.d/<file>).
 
 Is anyone (besides me ;-) interested in this sort of thing?  I'd be
 happy to work on it, but only if anybody gives a damn.  I'm not
 familiar with what should/shouldn't go into /sbin/init (which is where
 this sort of thing would have to go, right?) but I'm certainly willing
 to learn.
 
 Anyway, unless there's a reason to CC the bug list anymore, send
 further responses to me privately.  I'll summarize somewhere suitable
 (-hackers?) if anyone but me seems to care.  Otherwise, I'll just
 'mv foo foo.sh' and worry about something else... ;-)
 
 
 --Jeff
 
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Tue Jun 2 04:16:54 PDT 1998 
State-Changed-Why:  
this is by design. 
>Unformatted:
