Simplifying the LFS Bootscripts
archaic at linuxfromscratch.org
Sun Jan 9 10:18:31 PST 2005
On Sun, Jan 09, 2005 at 05:41:48PM +0000, Ian Molton wrote:
> I recon the /etc/sysconfig/network-devices/eth1 file should contain:
> ADDR=192.168.0.101/24 broadcast 192.168.0.255
> ADDR=192.168.0.102/24 broadcast 192.168.0.255
> Or something similar.
With that, you may as well be typing in the commandline, which IMO is
more educational. How about up() and down() doing something like:
ip link set $DEV up
ip addr add $IP/$PREFIX broadcast $BCAST dev $DEV
Name the config files numerically so that all you have to do is call all
the files in that dir in numeric order. If ONBOOT=yes, run the up() or
down () function on it. I say forget naming the files based on their
device. Why introduce code to parse the filename when a simple
declaration of the device can be made in the file?
> and the up and downing process shouldnt be part of the configuration
> file, it should be part of the script that interprets the file.
> Also your proposal leaves open a wide margin for sut-n-paste errors in
> that people will copy the 'add' lines and use them for the 'del' lines
> too, just changing the add to a del (or more likely, forgetting to).
Not to sound harse, but that is their problem. The whole book implies
the ability of the user to correctly transfer the text in the book to a
Government should be weak, amateurish and ridiculous. At present, it
fulfills only a third of the role.
- Edward Abbey
More information about the lfs-dev