[PLUG] Adding a startup script in SuSE

Galen Seitz galens at seitzassoc.com
Fri Mar 7 18:45:33 UTC 2008


Richard C. Steffens wrote:
> Last week I learned that in Slackware rc.local is where one puts
> something one wants to run when the system is booted. This week, I'm
> trying to locate that in SuSE.
> 
> There is a link in /etc called rc.d that points to init.d. Inside init.d
> there are numerous directories and files. There is boot.d, rc0.d through
> rc6.d, and rcS.d. I understand that rc0.d through rc6.d relate to run
> levels. I don't know what rcS.d is for, although from its contents, it
> looks like it's related to booting.
> 
> The SuSE documentation tells me:
> 
> --------------------------------------------------------------------
> boot.local
>  Here, enter additional commands to execute at boot before changing into
> a runlevel. It can be compared to AUTOEXEC.BAT on DOS systems.
> --------------------------------------------------------------------
> 
> boot.local does not appear to exist, yet. It's not clear to me if it is
> supposed to be a file I add to boot.d or a directory into which I put
> more files.
> 
> All I want to do is to have this command run when the system boots:
> 
> #! /bin/sh
> #
> #
> # create a link to /dev/ttyS0 for use by the x10 program
> ln -s /dev/ttyS0 /dev/ttyX10
> 
> Should I create a file named boot.local and put those line into it, or
> should I create a directory named boot.local and put another file in
> there with those lines.
> 
> If the later, is there a naming convention? I understand that the files
> for starting things begin with S followed by a number, and that they are
> executed in numerical order. Likewise, the files for shutting things
> down begin with K and a number. Would I create a similar convention for
> files I put into a boot.local directory?
> 
> TIA.
> 

I don't know about SuSE, but Redhat initialization works like this:

kernel boots and starts init process
init reads /etc/inittab
init runs /etc/rc.d/rc.sysinit
init runs /etc/rc.d/rc N, where N is the current runlevel
/etc/rc.d/rc runs the startup scripts in the directory rcN.d
In rcN.d there is a sym link S99local which points to ../rc.local. 
The S99 prefix causes rc.local to run last.

I would look in rc3.d or rc5.d for a symbolic link that points to 
boot.local.  Of course, none of this may be applicable to SuSE.

galen




More information about the PLUG mailing list