mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
Merge pull request #159 from twouters/bugfix/dhcpcd_resolvconf_symlink
Fix dhcpcd failing on systemd-resolved stub
This commit is contained in:
@@ -115,6 +115,10 @@ if test "$guestfs_network" = 1; then
|
||||
# Two workarounds for Ubuntu:
|
||||
touch /etc/fstab
|
||||
rm -f /etc/dhcp/dhclient-enter-hooks.d/resolved
|
||||
# Prevent dhcpcd from failing when /etc/resolv.conf is a dangling symlink.
|
||||
if [ -L "/etc/resolv.conf" ] && [ ! -e "/etc/resolv.conf" ]; then
|
||||
rm -f /etc/resolv.conf
|
||||
fi
|
||||
if dhclient --version >/dev/null 2>&1; then
|
||||
dhclient $iface
|
||||
elif dhcpcd $iface; then
|
||||
|
||||
Reference in New Issue
Block a user