2021-07-10 14:04:31 -05:00
|
|
|
#!/usr/bin/env fish
|
|
|
|
|
2022-01-31 11:40:03 -06:00
|
|
|
if test (id -u) -ne 0
|
|
|
|
echo "must run as root"
|
|
|
|
exit 1
|
|
|
|
end
|
|
|
|
|
|
|
|
function relink
|
2021-07-11 00:34:29 -05:00
|
|
|
rm -f $argv[2]
|
2021-07-10 14:04:31 -05:00
|
|
|
ezln $argv[1] $argv[2]
|
|
|
|
end
|
|
|
|
|
2022-01-31 11:40:03 -06:00
|
|
|
function recopy
|
|
|
|
rm -f $argv[2]
|
|
|
|
cp $argv[1] $argv[2]
|
|
|
|
end
|
|
|
|
|
2022-01-31 17:10:30 -06:00
|
|
|
# DNS, DHCP, prefix delegation
|
2022-01-31 16:44:36 -06:00
|
|
|
recopy dnsmasq.conf /etc/dnsmasq.conf
|
2022-01-31 17:11:33 -06:00
|
|
|
|
|
|
|
# let dnsmasq handle DNS
|
2022-01-31 16:44:36 -06:00
|
|
|
recopy resolved.conf /etc/systemd/resolved.conf
|
2022-01-31 17:11:33 -06:00
|
|
|
|
|
|
|
# sysctl flags we need for forwarding and accepting IPv6 router advertisements
|
2022-01-31 16:44:36 -06:00
|
|
|
recopy ./sysctl-configs /etc/sysctl.d/10-router-configs.conf
|
2022-01-31 11:40:03 -06:00
|
|
|
|
2022-01-31 16:44:36 -06:00
|
|
|
# enable systemd-networkd to setup network interfaces with useful names
|
2022-01-31 11:40:03 -06:00
|
|
|
recopy lan0.link /etc/systemd/network/10-lan0.link
|
|
|
|
recopy wan0.link /etc/systemd/network/10-wan0.link
|
|
|
|
|
2022-01-31 16:44:36 -06:00
|
|
|
# dhcp client configuration
|
|
|
|
recopy dhcpcd.conf /etc/dhcpcd.conf
|