forked from pool/ignition
Fabian Vogt
8d3e609fd1
- ignition-enable-network.sh: Use /lib/dracut/hooks directly instead of the usr-merged location which isn't available everywhere (bsc#1201957) OBS-URL: https://build.opensuse.org/request/show/992322 OBS-URL: https://build.opensuse.org/package/show/devel:kubic:ignition/ignition?expand=0&rev=98
19 lines
558 B
Bash
19 lines
558 B
Bash
#!/bin/bash
|
|
|
|
. /lib/dracut-lib.sh
|
|
|
|
if [ -f /run/ignition/neednet ] && ! getargbool 0 'rd.neednet'; then
|
|
echo "rd.neednet=1" > /etc/cmdline.d/40-ignition-neednet.conf
|
|
|
|
# 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
|
|
. /lib/dracut/hooks/cmdline/99-nm-config.sh
|
|
fi
|
|
fi
|