Using the LSB Bootscripts

Jeremy Huntwork jhuntwork at
Sun May 8 16:25:44 PDT 2011


So we've been using the LSB bootscripts for some time now on LightCube 
OS, with very little modification (we added dhclient service and the 
random bootscript to the default install), and it's behaved wonderfully.

There have been a few things that we noticed that we felt needed to 
change, namely:

* ifdown uses the configured service script to remove addresses from the 
interface. This becomes a problem when a user changes the configuration 
before running the script to restart networking.

Two possible scenarios here. One, the static service tries to remove the 
configured IP address from the device (which has changed and will thus 
fail) and adds the new IP. The result is two static IP addresses on the 
device. The second scenario is if you change the service, say from dhcp 
to static. The static will not kill the dhcp client when it restarts, 
and you could have two addresses again. Similarly, the dhcp client will 
not remove static addresses already assigned to the device before 
launching itself.

* When using in production systems, the heavy use of 'read Enter' on 
script errors, especially in generic cases, make it difficult to manage 
remote machines that have encountered an error on boot or halt/reboot.

* The sshd script (from BLFS) when halting doesn't kill user sshd 
sessions. It just stops the daemon. This results in frozen terminals 
until the session times out.

* The organization of files feels like it could be improved and made 
easier. For example, the ifdown and ifup scripts seem better placed in 

All of the above has led me to modify the scripts for LightCube's use 
and make the following changes:

* Add a param to release any dhclient addresses from a device if it is 
running in the ipv4-static service
* In the ipv4-static service, instead of attempting to remove the IP set 
in the configuration file, just flush all addresses with 'ip addr flush 
* In the dhclient service, flush any static addresses as well.
* Move ifdown and ifup to /sbin
* Move the equivalent of /etc/sysconfig/network-devices/services to 
* Move the equivalent of /etc/sysconfig/network-devices to /etc/network
* Move /etc/sysconfig/rc to /etc/default/rc
* Move any remaining /etc/sysconfig files (like modules) to /etc/default
* Create an /etc/default/rc.local to house configurations like UTC and 
* Add logic from Fedora to kill client sessions to the sshd init script.

There have been a few other minor modifications as well.

Obviously, with that many changes to the structure of the scripts, I 
don't expect them to be merged upstream. I assume I'd have to manage 
them myself. So this raises the question of licensing and/or proper 
attribution. From what I can tell, the scripts don't contain any sort of 
license. What should be done?



More information about the lfs-dev mailing list