2 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
3 # ex: ts=8 sw=4 sts=4 et filetype=sh
9 require_binaries ip arping dhclient ||
return 1
21 # Include wired net drivers, excluding wireless
24 local _net_drivers
='eth_type_trans|register_virtio_device|usbnet_open'
25 local _unwanted_drivers
='/(wireless|isdn|uwb|net/ethernet|net/phy|net/team)/'
27 # subfunctions inherit following FDs
28 local _merge
=8 _side2
=9
32 [[ $_fname =~
$_unwanted_drivers ]] && continue
34 *.ko
) _fcont
="$(< $_fname)" ;;
35 *.ko.gz
) _fcont
="$(gzip -dc $_fname)" ;;
36 *.ko.xz
) _fcont
="$(xz -dc $_fname)" ;;
38 [[ $_fcont =~
$_net_drivers
39 && ! $_fcont =~ iw_handler_get_spy
]] \
49 echo "$_f2" 1>&${_side2}
51 done | nmf1
1>&${_merge}
54 # Use two parallel streams to filter alternating modules.
56 eval "( ( rotor ) ${_side2}>&1 | nmf1 ) ${_merge}>&1"
57 [[ $debug ]] && set -x
61 { find_kernel_modules_by_path drivers
/net
; if [ "$_arch" = "s390" -o "$_arch" = "s390x" ]; then find_kernel_modules_by_path drivers
/s390
/net
; fi; } \
62 | net_module_filter | instmods
64 #instmods() will take care of hostonly
68 =drivers
/net
/ethernet \
69 ecb arc4 bridge stp llc ipv6 bonding
8021q af_packet virtio_net
75 inst_multiple ip arping dhclient
sed
76 inst_multiple
-o ping ping6
77 inst_multiple
-o brctl
78 inst_multiple
-o teamd teamdctl teamnl
79 inst_simple
/etc
/libnl
/classid
80 inst_script
"$moddir/ifup.sh" "/sbin/ifup"
81 inst_script
"$moddir/netroot.sh" "/sbin/netroot"
82 inst_script
"$moddir/dhclient-script.sh" "/sbin/dhclient-script"
83 inst_simple
"$moddir/net-lib.sh" "/lib/net-lib.sh"
84 inst_simple
"$moddir/dhclient.conf" "/etc/dhclient.conf"
85 inst_hook pre-udev
50 "$moddir/ifname-genrules.sh"
86 inst_hook pre-udev
60 "$moddir/net-genrules.sh"
87 inst_hook cmdline
91 "$moddir/dhcp-root.sh"
88 inst_hook cmdline
92 "$moddir/parse-ibft.sh"
89 inst_hook cmdline
95 "$moddir/parse-vlan.sh"
90 inst_hook cmdline
96 "$moddir/parse-bond.sh"
91 inst_hook cmdline
96 "$moddir/parse-team.sh"
92 inst_hook cmdline
97 "$moddir/parse-bridge.sh"
93 inst_hook cmdline
98 "$moddir/parse-ip-opts.sh"
94 inst_hook cmdline
99 "$moddir/parse-ifname.sh"
95 inst_hook cleanup
10 "$moddir/kill-dhclient.sh"
99 inst_libdir_file
{"tls/$_arch/",tls
/,"$_arch/",}"libnss_dns.so.*" \
100 {"tls/$_arch/",tls
/,"$_arch/",}"libnss_mdns4_minimal.so.*"
102 dracut_need_initqueue