Bootscript reorganization

Nathan Coulson conathan at gmail.com
Thu Jul 7 11:22:37 PDT 2011


On Thu, Jul 7, 2011 at 9:31 AM, Bruce Dubbs <bruce.dubbs at gmail.com> wrote:
> I've been looking at the bootscripts and want to do some fairly major
> reorganization.  I'm putting this out as a basis of discussion.
>
> 1.  Remove /etc/sysconfig/rc
>
> Presently this does
>
> rc_base=/etc/rc.d
> rc_functions=${rc_base}/init.d/functions
> network_devices=/etc/sysconfig/network-devices
>
> The indirection this provides does not appear to be needed to me.  Each
> boot script now does:
>
> . /etc/sysconfig/rc
> . ${rc_functions}
>
> I don't see a need for this.  Each script can have this replaced with
> the simpler
>
> . /etc/rc.d/functions

agree

> 2.  Remove /etc/sysconfig/network-devices
>
> Move the scripts ifdown, iftest, and ifup to /sbin.  Integrate
> ipv4-static* into the if* commands.

I did not like how ifup/down was getting complicated, but would this
not lock us into ipv4/static support only?

ipv6 is around the corner, and there is Bridging/DHCP/Wireless to
consider.  (also hotplug support, but I dont recall us having that
now)

What would replace ifconfig.{$IF} file/directory?




Slimming down ifup/down to skeletons, and putting the checks into the
network-devices scripts, as well as moving the network-devices to
/lib/something. is one option in my mind, but that does not solve
everything.  [I have a few ideas, I can put together an example]


I have not looked into gnome's network manager, but I wonder what it
needs from the bootscripts to work,  What we have is LFS Specific (and
at the time, there did not seem to be a cross distro solution to
this).  [Note: Not sure if I would ever suggest using the network
manager, but at the very least


Whatever solution we have, I would like to see the following

- ifup/down should be simple,  Anything interface/protocol specific
should not be in these files
- Should be possible to use with IPV4/IPV6/DHCP.
- Would be nice if it can be used for Bridging/Wireless.
- Should work with 3rd party configuration tools such as gnome network
manager.  (wish I knew a commandline example...)
- Hotplug support possible, possibly with 3rd party tool post lfs.

Solutions:
- A modular solution, would allow us to use any protocol/setup w/o
ifup/down knowing anything about it. [currently in lfs]
- ifup/down last I dealt with had checks to determine if the interface
existed or not.  This file can be a lot simpler, and these details can
be pushed down into the modules.

I'll update this, once I find out what is out there for non lfs
network configuration programs.  (I personally had no plans to ever
install network-manager [unless I will be supporting it])

> 3.  Place all configuration parameters for the network into
> /etc/sysconfig/network.
>
> This would include the HOSTNAME as well as any information in
> /etc/sysconfig/network-devices/ifconfig.*/*

agree
> ---
>
> I think these changes will make the LFS bootscripts more understandable
> and easier to administer.  There will be a lot of changes as basically
> every bootscript will have to be touched.  Sections 7.11 and 7.13.2 of
> the book will also have to be reworked.
>
> We can use the opportunity to review and update the /etc/rc.d/rc and
> /etc/rc.d/functions scripts.
>
> I am requesting feedback.
>
>   -- Bruce
> --
> http://linuxfromscratch.org/mailman/listinfo/lfs-dev
> FAQ: http://www.linuxfromscratch.org/faq/
> Unsubscribe: See the above information page
>



-- 
Nathan Coulson (conathan)
------
Location: British Columbia, Canada
Timezone: PST (-8)
Webpage: http://www.nathancoulson.com



More information about the lfs-dev mailing list