Browse Source

network: configure NetworkManager to use dhclient

If the network module obtained a lease using dhclient, NetworkManager
must be configured to use it too, otherwise it would obtain a different
lease (and could potentially break a connection to the network volume).
master
Lubomir Rintel 7 years ago committed by Harald Hoyer
parent
commit
0454dc247a
  1. 6
      modules.d/40network/ifup.sh

6
modules.d/40network/ifup.sh

@ -41,6 +41,12 @@ do_dhcp() {
return 1 return 1
fi fi


if [ ! -e /run/NetworkManager/conf.d/10-dracut-dhclient.conf ]; then
mkdir -p /run/NetworkManager/conf.d
echo '[main]' > /run/NetworkManager/conf.d/10-dracut-dhclient.conf
echo 'dhcp=dhclient' >>/run/NetworkManager/conf.d/10-dracut-dhclient.conf
fi

while [ $_COUNT -lt $_DHCPRETRY ]; do while [ $_COUNT -lt $_DHCPRETRY ]; do
info "Starting dhcp for interface $netif" info "Starting dhcp for interface $netif"
dhclient "$@" \ dhclient "$@" \

Loading…
Cancel
Save