allow ifup bring up network manually even without netroot
authorDave Young <dyoung@redhat.com>
Thu, 2 Feb 2012 07:59:49 +0000 (15:59 +0800)
committerHarald Hoyer <harald@redhat.com>
Tue, 7 Feb 2012 11:14:21 +0000 (12:14 +0100)
commit957bc5c92f947effd6863175bb8393eb4c65d0fe
treef5a11317b06bcdc4895c4370d2f0563a8efdff06
parent418febfc4439cea5c5ab728bdd3e45e7705bd7a3
allow ifup bring up network manually even without netroot

For kdump we need scp vmcore to remote machine, the nic to be used is
not limited to netroot one. we need a feature for manually bringing up
 network interface. Also it is useful for emergency shell with
ssh-client for recovery or test purpose

I implement this by adding one argument to ifup script, user can use
`/sbin/ifup eth0 -m` to bring up eth0, note ifup will regard it a
manual operation for the nic specified in 1st argument if there's
the 2nd argument.

If same nic is used for netroot the 2nd argument will be ignored,
in this case we will leave netroot bring up it automatically to
avoid side effect. And in this case hooks such as kdump will need to
execute after netroot mounted.

`ifup eth0 -m` will create /tmp/net.eth0.manualup stamp file,
later dhclient-script can check this and pass $2 to netroot,
then netroot script will bring eth0 up

Thanks for comments and suggestions from David Dillow.

Signed-off-by: Dave Young <dyoung@redhat.com>
modules.d/40network/dhclient-script
modules.d/40network/ifup
modules.d/40network/netroot