router/link.fish

27 lines
473 B
Fish
Raw Normal View History

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
relink dnsmasq.conf /etc/dnsmasq.conf
recopy lan0.link /etc/systemd/network/10-lan0.link
recopy wan0.link /etc/systemd/network/10-wan0.link
recopy wan0.network /etc/systemd/network/wan0.network
recopy lan0.network /etc/systemd/network/lan0.network
2021-07-10 14:04:31 -05:00
2022-01-31 11:40:03 -06:00
mkinitcpio -p linux