Commit Graph

32 Commits (2cbcbd7532f29a49ea0b486dba3bfb3140de7eab)

Author SHA1 Message Date
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 e54a84113e get rid of rdnetdebug
set PS4 and output to /dev/initlog.pipe
2010-05-19 09:38:09 +02:00
Harald Hoyer 9ab1426534 40network/dhclient-script: be more verbose 2010-05-19 09:33:20 +02:00
Warren Togami 157a8ddf5c Revert to per-device resolv.conf by Seewer's suggestion. 2009-10-13 14:19:49 -04:00
Philippe Seewer 5fb4ac2286 Add DAD to dhclient-script
The manpage for dhclient-script says:

Before actually configuring the address, dhclient-script should
somehow ARP for it and exit with a nonzero status if it receives a
reply.

By using arping in dracut this is very easy, since arping has a
specific option to do just that.
2009-10-06 15:17:39 +02:00
Philippe Seewer d92ca28b16 Get rid of hostname utility
dracut doesn't really need a utility to set the hostname. It only
saves a few ks of space, but every bit is good.
2009-10-06 15:14:04 +02:00
Seewer Philippe d1dd6bb746 Be a bit more optimistic when setting mtus
The usual approach to setting mtus is to set the interface down,
set the mtu then set the interface back up again. Modern hardware
and/or drivers may support setting this on the fly, so we try
this and fall back to the old behaviour it it doesn't work.

In addition this patch only allows mtus greater than 576, this is
taken from debian/ubuntu dhclient-script.
2009-10-06 15:09:34 +02:00
Harald Hoyer bf87d252f3 network: wait for interfaces to come up, before proceeding 2009-10-06 15:07:52 +02:00
Harald Hoyer f57b5bc735 network: move netroot to initqueue
Schedule netroot for the initqueue inside ifup and dhclient.
2009-10-01 14:45:24 +02:00
Warren Togami 984a819b92 There is only one resolv.conf. 2009-07-30 09:27:09 -04:00
David Dillow e663608c40 dash compatible substitution 2009-07-23 23:16:31 -04:00
Warren Togami ef380e9de8 Turns out this is really a misconfigured DHCP server, apply the same workaround as Debian and upstream dhclient-script. 2009-07-23 16:22:00 -04:00
Warren Togami 39f3a51d65 Fix multiple search domains with proper quoting (thanks dcbw)
Otherwise \032 appears instead of spaces.
2009-07-23 14:31:58 -04:00
Harald Hoyer b8f39ef152 renamed dracut-lib to dracut-lib.sh 2009-06-19 13:00:09 +02:00
Seewer Philippe 02a187e161 removed exit on fail "sh -e" for dhclient-script
The Bug causing dhclient to recall BIND has been identified:
dhclient-script runs with #!/bin/sh -e, causing setup_interface
to fail if no hostname is provided by dhcp as it is the last statement
in that function.
2009-06-18 15:35:00 +02:00
Seewer Philippe 00c0d5b869 fix check for dhclient-script, if interface is already up 2009-06-18 10:36:32 +02:00
Philippe Seewer db8158439d multnic support: move actual interface configuration to netroot
Instead of configuring devices when they are ready, ifup and
dhclient-script write script files which are then sourced by
netroot.

This solves the problem of having multiple interfaces and not knowing
which one to use for dhcp or default route. This way, netroot (which
is serialized anyway) configures the interface before calling the root
handler and deconfigures it if the handler failed.

Example: root=nfs:server:path and ip=dhcp with eth0 and eth1 receiving
a dhcp reply, but eth0 is the correct one to use.

Assuming eth1 is the first to receive the dhcp-reply, netroot starts
and configures eth1. nfsroot is run but fails, so eth1 is deconfigured. If
eth0 has received a dhcp-reply (or not, then we wait) the other locked
netroot process starts and tries with eth0 and succeeds.
2009-06-17 08:37:40 +02:00
Philippe Seewer 580bb5417c netroot and others: Style changes
Multiline conditionals ( && { ... } ) should use if, function
declarations go to the top of the file, add/update comments and remove
some unnecessary clutter.
2009-06-17 08:37:39 +02:00
Philippe Seewer 0c26abfa81 netroot: Always write an override file if an ip= line is present
Even if we use dhcp, ip= lines are allowed to contain the server-ip
for nfsroot, so we should store those variables for later use.
2009-06-17 08:37:39 +02:00
Seewer Philippe d3b0f96893 Use relative path for ip command. 2009-06-15 17:34:36 -04:00
Warren Togami f3d9b04d1a .override also becomes net.* file only after successful rootfs mount. 2009-06-10 14:02:45 -04:00
Warren Togami bf4626d933 dhclient.* files become net.* only after successful netboot.
This is an attempt to avoid confusing post-boot scripts by having them
consider only net.* files.
2009-06-10 10:21:11 -04:00
David Dillow aa43d0b0df More runtime files to /tmp 2009-05-27 22:54:03 -04:00
Warren Togami 3da5856981 Move all files generated during initrd runtime to /tmp 2009-05-27 22:41:18 -04:00
Harald Hoyer 4127130480 prefixed more internal command line options with "rd"
break -> rdbreak
netdebug -> rdnetdebug
2009-05-27 14:56:20 +02:00
Harald Hoyer 9223814d59 do not trap if hostname is empty 2009-05-25 15:32:30 +02:00
David Dillow 7e9919b927 network: prepare network configuration engine for udev-based nfsroot
This changes the network config to run dhclient from within udev, and
allows multiple dhclients to run at once. It also sets the hostname and
adds a kernel command line option 'netdebug' to help debug network issues.
2009-05-25 12:19:25 +02:00
Harald Hoyer c02c339bb5 fixed dhclient dhcp options saving 2009-05-18 16:08:58 +02:00
Harald Hoyer f5f9bfee2d add full patch to /sbin/ip and check for dhclient $pid before kill 2009-03-09 13:08:12 +01:00
Victor Lowther 02d7fdcab4 Minor changes to network scripts to bring inline with my current patch series 2009-03-06 17:04:05 -06:00
Harald Hoyer 9ec23437fa add /sbin to $PATH 2009-03-06 14:36:18 +01:00
Victor Lowther 20abd91484 Create a self-contained structure for dracut modules
All modules now live in a subdirectory /modules.d.  Each module is
self-contained -- it should contain everything that it will install
on the initrd.  All modules must include a script named install, which
will be sourced by dracut.  This script should do the actual file installation
using inst methods.  The moddir variable will point to the full path to the
module dracut is currently working on.

As usual, this patch series applies on top of my previous patch series,
and is available as normalize-modules from http://git.fnordovax.org/dracut.
2009-03-04 16:55:14 +01:00