Ubuntu Pastebin

Paste from mvo at Wed, 7 Sep 2016 19:36:24 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
$ cat /lib/systemd/system/systemd-networkd-resolvconf-update.service 
[Unit]
Description=Update resolvconf for networkd DNS
ConditionPathIsSymbolicLink=/etc/resolv.conf
ConditionPathExists=/run/resolvconf/enable-updates
After=resolvconf.service

[Service]
Type=oneshot
StartLimitBurst=20
# we might be triggered several times in short succession during restarting networkd, so wait until we get a DNS entry
ExecStart=/bin/sh -c 'for timeout in `seq 30`; do out=$(sed -n "/^DNS=/ { s/^DNS=/nameserver /; p}" /run/systemd/netif/state /run/systemd/netif/leases/* | sort -u /run/systemd/netif/leases/* | sort -u); [ -z "$out" ] || break; sleep 1; done; echo "$out" | /sbin/resolvconf -a networkd'
Download as text