feat(os): Let's assume we want a DNS server pushed via DHCP (#1)
This commit is contained in:
parent
58919e0d7f
commit
a2ca77b70a
5
setup.sh
5
setup.sh
@ -509,7 +509,7 @@ DHCP=ipv4
|
||||
IPForward=yes
|
||||
|
||||
[DHCP]
|
||||
UseDNS=no
|
||||
UseDNS=yes
|
||||
RouteMetric=10
|
||||
EOF
|
||||
systemctl enable 'systemd-networkd' --root='/mnt'
|
||||
@ -519,6 +519,9 @@ EOF
|
||||
function configure_dns () {
|
||||
rm '/mnt/etc/resolv.conf'
|
||||
ln -s '/run/systemd/resolve/stub-resolv.conf' '/mnt/etc/resolv.conf'
|
||||
|
||||
# Optionally you may want /etc/systemd/network/50-wired.network to use
|
||||
# UseDNS=no and hardcode DNS server(s) here:
|
||||
# sed -i 's/^#DNS=.*/DNS=1.1.1.1/' /mnt/etc/systemd/resolved.conf
|
||||
systemctl enable 'systemd-resolved' --root='/mnt'
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user