2020-08-10 11:28:39 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
. /lib/dracut-lib.sh
|
|
|
|
|
|
|
|
if [ -f /run/ignition/neednet ] && ! getargbool 0 'rd.neednet'; then
|
2020-09-11 10:27:57 +02:00
|
|
|
echo "rd.neednet=1" > /etc/cmdline.d/40-ignition-neednet.conf
|
2020-08-10 11:28:39 +02:00
|
|
|
|
2022-03-04 16:13:47 +01:00
|
|
|
# Re-trigger generation of network rules and apply them
|
|
|
|
if [ -e /lib/dracut/hooks/pre-udev/60-net-genrules.sh ]; then
|
|
|
|
# Wicked
|
|
|
|
. /lib/dracut/hooks/pre-udev/60-net-genrules.sh
|
|
|
|
udevadm control --reload
|
|
|
|
udevadm trigger --subsystem-match net --action add
|
|
|
|
else
|
|
|
|
# NetworkManager
|
2022-08-02 15:00:22 +02:00
|
|
|
. /lib/dracut/hooks/cmdline/99-nm-config.sh
|
2022-03-04 16:13:47 +01:00
|
|
|
fi
|
2020-08-10 11:28:39 +02:00
|
|
|
fi
|