Commit Graph

440 Commits (b80ee080937ce364f7324c297f23e40af6d88892)

Author SHA1 Message Date
Philippe Seewer a55d10c05c netroot: Use same method to check for already mounted root as init
base/init uses [ -d "$NEWROOT/proc" ] to check if root is mounted
or not. Netroot should do the same. In addition this gets rid of
another file in /tmp, since /tmp/netroot.done isn't needed anymore.
2009-06-17 08:37:39 +02:00
Philippe Seewer 2734a87537 netroot: Use root.info instead of netroot.info
Having two files which are used more or less at the same time isn't
that easy to handle and read. Instead, move the contents of netroot.info
to root.info and only use root.info. This is cleaner and makes debugging
easier.
2009-06-17 08:37:39 +02:00
Philippe Seewer 05e2c5923c netroot: Check argument
There's no sense in running netroot without a valid first argument
and further running netroot with no interface config present isn't
good as well.
2009-06-17 08:37:39 +02:00
Philippe Seewer 9cdfd735a8 netroot: Don't export NEWROOT
Exporting NEWROOT to handlers when we already pass them two other
arguments doesn't make sense. Passing it as a third argument is
better.
2009-06-17 08:37:39 +02:00
Warren Togami 1a945a576c move dhclient.conf to /etc 2009-06-16 11:43:13 -04:00
Seewer Philippe d3b0f96893 Use relative path for ip command. 2009-06-15 17:34:36 -04:00
Seewer Philippe 12375368b9 Allow dhcp to work with dhcpv3 where the -R option did not exist. Use dhclient.conf instead. 2009-06-15 16:57:10 -04:00
David Dillow aec48753c2 network: add support for netroot=...
This adds support for a command line option netroot=, which is currently
equivalent to root=. This will allow us to break out handling in NBD and
iSCSI to support constructs such as "root=LABEL=/ netroot=dhcp" to make
use of our block device handling with network attached devices.

iSCSI has not been changed in this patch as I don't currently have a way
to test it.
2009-06-11 01:47:11 -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 9a9777a19c Write ifcfg style file upon successful netboot.
TODO: static must be implemented, example in comments.
2009-06-10 13:16:50 -04:00
Warren Togami f2287b3626 Write MAC address to a file at successful netroot mount, NetworkManager wants this. 2009-06-10 11:12:14 -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
Warren Togami 1311803770 Write DHCP lease file, dcbw wants it for NetworkManager to take over management of the lease post-netboot. 2009-06-08 17:18:01 -04:00
Peter Jones 3871f8f53b Don't use backticks, use $()
This is a minor style fix.
2009-06-05 10:20:13 -04:00
Seewer Philippe 07b2fbb183 Get rid of cat and grep 2009-06-05 16:10:52 +02:00
Harald Hoyer 4332e5f71f install cat for network module 2009-06-02 13:21:16 +02:00
Warren Togami 9dcf9cef38 Include only wired ethernet drivers, explicitly exclude wireless.
(If you REALLY want wireless boot, you need to write your own module to configure it properly.)
2009-06-01 18:21:40 -04:00
David Dillow 7d7efa4a3d netroot: add common handler for network root devices
/sbin/netroot is a jumping off point to allow various network
root devices to share infrastructure. It will loop over scriptlets
in the netroot handler, looking for a handler to run for this type
of netroot. Handlers can do choose to act based on command line
options to the kernel, or via DHCP options received on this interface.
They should massage root= into a form suitable for their handler.
2009-06-01 00:42:43 -04:00
Victor Lowther f3fb8d8074 Modify the check script so that 40network will only load as a
dependency on another module.
2009-05-29 23:07:56 -05:00
Warren Togami ba126e82af $drivers specified from .conf or --drivers get copied once, instead of multiple times with other calls to instmods() 2009-05-28 15:55:44 -04:00
Warren Togami e19d6bf603 Disambiguate modules and drivers. modules are dracutmodules. drivers are kernel modules. 2009-05-28 14:27:02 -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
Victor Lowther 1e19548857 Add check files for network and nfsroot
This way dracut will not try to install them if the system does not have
the needed prerequisites.
2009-05-25 16:35:57 -05:00
Harald Hoyer 28df9479e1 make root=dhcp work 2009-05-25 16:48:01 +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 6c00df2068 removed debug code 2009-05-18 16:38:32 +02:00
Harald Hoyer c02c339bb5 fixed dhclient dhcp options saving 2009-05-18 16:08:58 +02:00
Harald Hoyer b80a6fda40 fixed wildcard test of run-dhclient.sh 2009-05-18 15:31:07 +02:00
Harald Hoyer 32f32c14b6 fixed 40network module 2009-05-18 15:22:33 +02:00
Harald Hoyer 17edb6aa4e mkdir /var/run for dhclient 2009-05-18 14:08:02 +02:00
Harald Hoyer b300c0354a kill dhclient if pid was found 2009-05-18 14:07:34 +02:00
Harald Hoyer e7b6ed1379 do not run dhclient, if no net device found 2009-05-15 12:43:03 +02:00
Harald Hoyer a011d66860 install all network modules 2009-05-12 15:47:01 +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