summaryrefslogtreecommitdiff
path: root/modules.d/95nbd
diff options
context:
space:
mode:
authorDavid Dillow <dave@thedillows.org>2009-06-01 19:59:22 -0400
committerDavid Dillow <dave@thedillows.org>2009-06-01 19:59:22 -0400
commitb4dc8ad346413fa131fc15a09f6c40464966191f (patch)
tree66978697b59c2aa839eeed172648172784c1c48d /modules.d/95nbd
parent7132e6a34677691d428967462bbe7134fb2cdf52 (diff)
downloaddracut-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-xmodules.d/95nbd/nbdroot12
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