euglug.org

[Eug-lug] Slackware processes at startup]

작성자

카테고리:



Matthew JarvisWed Mar 22 11:52:45 PST 2006

Thanks for all the input on this guys....

I've been a bit swamped but hopefully very shortly I'll have time to 
poke around the guts of this thing and document what's going on...

Muchos Gracias!

Gonna see everyone at SAO tomorrow night?

Matt


Matthew S. Jarvis
IT Manager
Bike Friday - "Performance that Packs."
www.bikefriday.com
541/687-0487 x140
mattj at bikefriday.com


Matthew Jarvis wrote:
> This was a post Neil sent me directly and asked me to post it to the list.
> 
> mj
> 
> -------- Original Message --------
> Subject: Re: [Eug-lug] Slackware processes at startup
> Date: Mon, 20 Mar 2006 22:46:59 -0800 (PST)
> From: nparker at LLX.COM (Neil Parker)
> To: mattj at bikefriday.com
> 
> Matthew Jarvis wrote,
> 
>> Running Slackware it doesn't seem to have anything to tell me what it 
>> loads up when the machine is turned on.
>>
>> To find out do I just have to work my way thru the rc1, rc2 etc chain?
>>
>> Is there a command or tool that will just tell me?
>>
>> I'm half tempted to just restart the thing and do a quicky 'ps' 
>> command to get a snapshot... hope it doesn't come to that though...
> 
> 
> The Real Story about startup on Slackware:
> 
> Slackware uses a hybrid startup script system--it has a SysV-style
> init, but the scripts are more classic-BSD style.
> 
> This means that at startup, it reads /etc/inittab to figure out what to do,
> just like KBob described in his mail.
> 
> But the scripts under /etc/rc.d are much simpler that what KBob described.
> There is no startup script management system like what other distros have,
> and therefore no shell command to tell you what subsystems start up at
> what levels.  If you want to find out exactly what runs, you don't have
> much choice except to read through the files in /etc/rc.d.
> 
> A perusal of Slackware's /etc/inittab will reveal that everything
> depends on six scripts under /etc/rc.d:
> 
>      rc.S:  This runs once at every boot.  It starts up basic services
>          that always need to run (like hotplug).  This is also where the
>          filesystems get fsck'ed if necessary, and the swap partition gets
>          activated, and filesystems get mounted.
> 
>      rc.K:  This puts the system in single-user mode.  It only runs if
>          you boot into runlevel 1.
> 
>      rc.M:  This puts the system in multi-user mode.  It runs on most boots
>          (unless you asked for runlevel 1) after rc.S.  This is more or 
> less
>          the master boot script--it's responsible for running most of the
>          other scripts in /etc/rc.d.
> 
>      rc.0:  This runs at shutdown time if you asked for a halt.
>      rc.4:  This starts up the X window system.
>      rc.6:  This runs at shutdown time if you asked for a reboot.
> 
> The other scripts in /etc/rc.d are all intended to start various
> subsystems, and most of them (except some of the network-dependent ones)
> are run out of rc.M.  They only run if their execute permissions are
> turned on, so you can deactivate any rc.* script by taking away its
> execute permissions.
> 
> The most important of the additional rc.d scripts are rc.inet1 and
> rc.inet2.  These start up networking...rc.inet1 configures your
> interface(s), and rc.inet2 starts your network daemons (rc.inet2
> is responsible for running the network-related rc.* scripts that aren't
> run by rc.M).
> 
> One of the scripts started by rc.M is rc.sysvinit.  This provides basic
> support for SysV-style startup scripts, if you need to install a package
> that absolutely requires SysV-style startup scripts.  No standard
> Slackware packages use this feature.
> 
> Finally, that last thing run by rc.M is rc.local.  This is where you're
> supposed to add your own customized startup commands.
> 
> 
> So for a reasonably comlete picture of what gets run on startup, look at
> the following files, in this order:
> 
>      /etc/inittab
>      /etc/rc.d/rc.S
>      /etc/rc.d/rc.M
>      /etc/rc.d/rc.inet2
>      /etc/rc.d/rc.4 (if your system is configured to boot into X)
> 
> Also take note of which rc.* scripts are executable, since that controls
> what services actually get started...if it's executable, it probably gets
> run by rc.M or rc.inet2.
> 
> 
> The advantage of Slackware's simplified startup script system is speed.
> Your Slackware box will probably be up and ready to accept commands before
> your Redhat box is even halfway through that long list of [OK]'s.  The
> disadvantage of Slackware's startup scripts is the lack of fine-grained
> control...it's easy to configure a Redhat box so that (for example)
> sendmail only starts at runlevels 2 and 5, but it's more difficult to do
> the same thing in Slackware.
> 
> Personally, I find I've never missed the fine-grained control that I give
> up by using Slackware startup scripts.
> 
>              - Neil Parker
>