Subject: misc/9756: Be care full with /etc/rc.d change and /etc/rc.local
To: None <netbsd-bugs@netbsd.org>
From: John Darrow <John.P.Darrow@wheaton.edu>
List: netbsd-bugs
Date: 04/05/2000 14:58:21
Date: Tue, 4 Apr 2000 00:50:33 +0900 (JST)
From: Takahiro Kambe <taca@sky.yamashina.kyoto.jp>
Reply-To: taca@sky.yamashina.kyoto.jp
To: gnats-bugs@gnats.netbsd.org
Subject: Be care full with /etc/rc.d change and /etc/rc.local


>Number:         9756
>Category:       misc
>Synopsis:       Be care full with /etc/rc.d change and /etc/rc.local
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 03 08:54:00 PDT 2000
>Closed-Date:    
>Last-Modified:  
>Originator:     Takahiro Kambe
>Release:        NetBSD-current 2000/4/2
>Organization:

	
>Environment:

	
System: NetBSD edge.sky.yamashina.kyoto.jp 1.4X NetBSD 1.4X (CF-M33) #6: Mon Apr 3 15:52:03 JST 2000 taca@edge.sky.yamashina.kyoto.jp:/usr/src/sys/arch/i386/compile/CF-M33 i386




>Description:
Be care full with /etc/rc.d change and /etc/rc.local.


/etc/rc.local seems to be supported by /etc/rc.d system, but it
needs much care for migration.


1. Old /etc/rc.local was supposed to execute on start up stage only.
2. /etc/rc.d/local execute /etc/rc.local under the new frame work,
   so it executed on start up and shutdown stage.


Then /etc/rc.local needs to change into check the stage by itself.
Easiest way is insert 4 line in the begining of /etc/rc.local like bellow:


--- rc.local.orig	Tue Apr  4 00:48:00 2000
+++ rc.local	Tue Apr  4 00:48:15 2000
@@ -6,6 +6,10 @@
 # It is intended to be edited locally to add site-specific boot-time
 # actions, such as starting locally installed daemons.
 #
+case $1 in
+start)		;;
+*)		exit;;
+esac

 
 echo -n 'starting local daemons:'

 

 
>How-To-Repeat:
	Install new /etc/rc.d stuff without change /etc/rc.local.
>Fix:
	It should be some note (caution) in some document.


>Release-Note:
>Audit-Trail:
>Unformatted: