diff options
author | David Dillow <dave@thedillows.org> | 2009-06-01 19:59:22 -0400 |
---|---|---|
committer | David Dillow <dave@thedillows.org> | 2009-06-01 19:59:22 -0400 |
commit | b4dc8ad346413fa131fc15a09f6c40464966191f (patch) | |
tree | 66978697b59c2aa839eeed172648172784c1c48d /modules.d/95nbd | |
parent | 7132e6a34677691d428967462bbe7134fb2cdf52 (diff) | |
download | dracut-b4dc8ad346413fa131fc15a09f6c40464966191f.tar.gz dracut-b4dc8ad346413fa131fc15a09f6c40464966191f.tar.bz2 dracut-b4dc8ad346413fa131fc15a09f6c40464966191f.zip |
Allow NFS and NBD to be built into the kernel
Probe for NFS and NBD capability before trying to load their modules
in case they are built into the kernel. Ugly use of flag files, but
avoids the need for grep to be on the image.
Diffstat (limited to 'modules.d/95nbd')
-rwxr-xr-x | modules.d/95nbd/nbdroot | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/modules.d/95nbd/nbdroot b/modules.d/95nbd/nbdroot index 51120c24..1130cca0 100755 --- a/modules.d/95nbd/nbdroot +++ b/modules.d/95nbd/nbdroot @@ -71,7 +71,17 @@ getarg ro && nbdrw=ro getarg rw && nbdrw=rw fsopts=${fsopts+$fsopts,}${nbdrw} -modprobe nbd || exit 1 +if [ ! -e /tmp/nbd.present ]; then + cat /proc/devices | while read t1 devt; do + if [ "$devt" = "nbd" ]; then + >/tmp/nfs.present + break + fi + done +fi +if [ ! -e /tmp/nbd.present ]; then + modprobe nbd || exit 1 +fi # XXX better way to wait for the device to be made? i=0 |