]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Include only wired ethernet drivers, explicitly exclude wireless.
authorWarren Togami <wtogami@redhat.com>
Mon, 1 Jun 2009 22:21:40 +0000 (18:21 -0400)
committerWarren Togami <wtogami@redhat.com>
Mon, 1 Jun 2009 22:21:40 +0000 (18:21 -0400)
(If you REALLY want wireless boot, you need to write your own module to configure it properly.)

modules.d/40network/install

index 3112494218e3c53c4744530e201e68ec7c19776c..3a06f79a151322fd38e2e190eb7507fd36acea09 100755 (executable)
@@ -1,10 +1,19 @@
 #!/bin/bash
 dracut_install ip dhclient hostname
-instmods =net
+# Include wired net drivers, excluding wireless
+for modname in `find "/lib/modules/$kernel/kernel/drivers" -name '*.ko'`; do
+  if nm -uPA $modname | grep -q eth_type_trans; then
+    if echo "$modname" | grep -q wireless; then
+      continue
+    else
+      instmods $modname 
+    fi
+  fi
+done
 inst "$moddir/ifup" "/sbin/ifup"
 inst "$moddir/netroot" "/sbin/netroot"
 inst "$moddir/dhclient-script" "/sbin/dhclient-script"
-instmods =networking ecb arc4
+instmods ecb arc4
 inst_rules "$moddir/60-net.rules"
 inst_hook cmdline 99 "$moddir/dhcp-fallback.sh"
 inst_hook pre-pivot 10 "$moddir/kill-dhclient.sh"