Commit Graph

22 Commits

Author SHA1 Message Date
Harald Hoyer
689c3e1fcd network/parse-ip-opts.sh: remove check for netroot
with anaconda and all other kind of stuff, we might want network, even
for root not on the network
2012-04-19 16:41:04 +02:00
Harald Hoyer
990e945ffd add mtu and macaddr to ip= 2012-04-05 13:25:41 +02:00
Will Woods
25aa3c5a6e network: refactor stuff from netroot/parse-ip-opts to net-lib
Add new functions: all_ifaces_up, get_netroot_ip, ip_is_local, ifdown,
setup_net, set_ifname, ibft_to_cmdline

Use them in netroot.sh and parse-ip-opts.sh.

There's also a couple little unrelated cleanups.
2012-03-08 11:01:40 +01:00
Harald Hoyer
edd3262efd 40network/parse-ip-opts.sh: "local" can only be used in functions 2012-02-22 16:13:20 +01:00
Anton Blanchard
e7cbf8fd30 ip= server-id should be server-IP
From looking at the code it seems like server-id should really
be named server-IP.
2012-01-23 09:48:35 +01:00
Harald Hoyer
3b403b32fc removed trailing whitespaces 2011-05-10 11:56:09 +02:00
Harald Hoyer
ba7457ee00 network/parse-ip-opts.sh: fix ifname for ibft with all args 2011-05-02 11:30:29 +02:00
Marian Ganisin
c34130f705 don't overwrite ifname=
[Harald Hoyer <harald@redhat.com>: replaced grep with strstr]
[Harald Hoyer <harald@redhat.com>: handle multiple ifname= arguments]
2011-05-02 11:28:29 +02:00
Marian Ganisin
cc8f077e9f skip condition fixed 2011-05-02 11:28:22 +02:00
Marian Ganisin
ccacb45c52 correct module name 2011-05-02 11:28:04 +02:00
Harald Hoyer
c9f1e3d1f4 check for getarg() function before sourcing dracut-lib.sh
make use of "type getarg" to check, if we really need to source
dracut-lib.sh
2011-03-25 16:10:46 +01:00
Harald Hoyer
38ba0d7a62 network: add iBFT interface configuration
[forward port of 0828d4c3574693ae80c217229e1bba6948dc9509]
2011-03-07 13:37:20 +01:00
Harald Hoyer
cc02093d69 reformat source code
removed tabs and set indention to 4 spaces
added emacs and vi format headers
2010-09-10 15:34:36 +02:00
Harald Hoyer
1c894acb42 fixed "ip=dhcp6" 2010-06-17 16:25:28 +02:00
Harald Hoyer
647035f9aa 40network/parse-ip-opts.sh: add "ip=auto6" to valid options 2010-05-19 08:29:05 +02:00
Harald Hoyer
c98bcec89c add preliminary IPv6 support 2010-02-04 16:05:19 +01:00
Harald Hoyer
3e6d2b31ea removed all direct references to /proc/cmdline
use getarg() and getargs() from /lib/dracut-lib.sh instead of
reinventing the wheel
2009-07-24 11:54:08 +02:00
Harald Hoyer
1c709728ec removed warning "No ip= argument(s) for netroot provided..." 2009-07-13 15:03:11 +02:00
Philippe Seewer
8ecd9d010a multinic support: Add bootdev cmdline argument
This introduces a new cmdline argument bootdev, to support the case
where multiple nics need to be up before the netroot handler is called.
Cases involved might be bonding, iscsi multipathing, bonding, ...
This argument is required to decide which interface is the primary to
use for dhcp root-path, default gw, etc.

When multiple ip= items are present on the cmdline, the ip= parser
now enforces the presence of <dev> further demands that the new argument
bootdev contains the name of the primary interface. Configurtion if of
course still delegated to netroot but in is enhance to ensure that netroot
"waits" for all required interfaces to be up.

Example: root=dhcp ip=eth0:dhcp ip=client-ip:::netmask::eth1:off bootdev=eth0

First, the ip= cmdline parser ensures that all ip items contain a <dev> then
checks the ip items and checks as well that an ip= item for the given bootdev
was found.

When the first netroot starts, probably for eth1, it checks wheter interface
configuration for all interfaces is available. If not it exits. The second
start of netroot (eth0, which was a bit delayed because of dhcp) sees that
all interfaces are present, configures them and continues.
2009-06-17 08:37:40 +02:00
Philippe Seewer
3029be4df8 netroot: Add pxelinux BOOTIF support
Having BOOTIF as an argument is a clear pointer which interface should be
used for netroot. This changes network rule generation accordingly.
2009-06-17 08:37:40 +02:00
Philippe Seewer
761ffdddb9 netroot: Only start interface configuration if really needed
Currently network configuration is launched by udev as soon as it
discovers a driver. This isn't such a good idea since we don't know
if network configuration is actually required. Change this by writing
the udev rules on the fly if required.
2009-06-17 08:37:40 +02:00
Philippe Seewer
1b31fc140b netroot: Add ip= cmdline checker
As with other netroot boot arguments ip= lines should be parsed and
checked. Having this has the advantage that other cmdline scripts
can tell the ip= parser if dhcp or ip=:srv:... is needed, like
parse-root.sh (renamed dhcp-fallback) or parse-nfsroot do.

The nfs test-suite has one check which uses static ip lines, but
the autoconf param is wrong. Fixed this as well.
2009-06-17 08:37:40 +02:00