10.8 Triggering network configuration
We have seen how interfaces can be configured or reconfigured. This needs to
be done at appropriate times.
Traditionally the network was configured during the boot sequence via the
/etc/rcS.d/S40networking initscript and was rarely reconfigured.
Services that depended on networking were started later in the boot sequence.
On shutdown or reboot the initscripts were run in the opposite order.
Currently, however, there is a trend in GNU and Linux toward supporting
hardware and circumstances that change dynamically. First support was added
for hot swappable PCMCIA cards; more recently the hotplug
mechanism has been added so that many more peripherals can be swapped in and
out while the computer is running. This includes networking hardware. Note
that services that depend on hardware that is hot swapped must only be started
after the hardware is inserted and must be stopped when the hardware is
removed. This means that such services must be removed from the control of the
System V init system and put under the control of
For example, suppose service foo controlled by initscript
/etc/init.d/foo depends on dynamically reconfigured network
First remove foo from the control of the init system. If you are
sysv-rc init system then do the following. 
# rm /etc/rc.d/S??foo
Then put foo under the control of
ifupdown by adding
up and down options to the eth0 stanza
/etc/network/interfaces which contain calls to the
iface eth0 inet dhcp
up /etc/init.d/foo start
down /etc/init.d/foo stop