Using the LSB Bootscripts

Jeremy Huntwork jhuntwork at
Mon May 9 10:07:47 PDT 2011

On 5/9/11 1:57 AM, Bryan Kadzban wrote:
> I believe the book has static IP addressing, and DHCP.  There's also
> both PPP (for both dial-up modems and cell-phone-network access) and
> PPPoE, and I've added WoL to this system, as noted above.  (Obviously
> that only works for wired network cards though.  Not modems or wireless
> or whatever.)
> Wireless I have no idea how to set up using this system, although I was
> going to do it at one point.  wpa_supplicant is complicated.  :-)

Nor I. Perhaps then abstract the actual down commands (most boil down to 
one line) into something universal and run tests to see which need to be 
run for that interface, i.e., which is it currently using?

> Right, but you have no way to know (in the static config, or the DHCP
> config, for instance) whether a pppd was running and needs to be killed,
> or whether DNS needs to be unregistered (unlikely, but not impossible),
> or whether a wireless card needs to be disassociated.

There has to be ways to check in the running system how a device is 
configured if it's active.

> I can see that logic, I suppose.  But bootscript config (which is what
> both /etc/sysconfig/rtc and friends, and /etc/sysconfig/network*, are
> today) seems different enough from systemwide defaults for new users, to
> warrant a different directory.  Maybe the useradd defaults file should
> have been stuck somewhere near /etc/skel or something.  But at least in
> my mind, separating the two makes sense.
> (Then again, my mind is a scary place.  :-P)

The /etc/sysconfig/network* have already been moved to /etc/network. 
What is now /etc/default/rc as per the changes is really just default 
configurations for how the bootscripts run.

Just as an FYI, the plans for most of these changes come from myself and 
Archaic who has been assisting with LightCube. The proposed 
/etc/default/rc.local file was a last minute addition by myself, but 
after this discussion, and some more with Archaic, I think perhaps that 
name is wrong (I forgot about the rc.local bootscript!) and perhaps it 
should be /etc/default/

> Ah, I see what was done: they test $runlevel, then kill all sshd's in
> the case of a reboot or halt.  (This includes killing the script that's
> running, but the do-nothing trap installed before the killall and
> removed after it, stops it from failing.)
> What happens if the machine shuts down with ssh sessions active, without
> this?  Do they just hang and eventually time out?  Or do they die when
> the NIC gets taken down?  (...Is the kernel that smart?)  Or does
> something log all users out earlier?  (What about killall5, run from
> sendsignals?  That might be too late though?)

Without this, the terminal hangs until the timeout is reached and then 
the session closes and the terminal becomes active on the localhost again.


More information about the lfs-dev mailing list