sane-vpn: fix typos in recently-modified sane-vpn {up,down} paths
This commit is contained in:
@@ -98,6 +98,7 @@ in
|
|||||||
|
|
||||||
systemd.services.bind.serviceConfig.ExecStartPre = pkgs.writeShellScript "named-generate-config" ''
|
systemd.services.bind.serviceConfig.ExecStartPre = pkgs.writeShellScript "named-generate-config" ''
|
||||||
mkdir -p /run/named/dhcp-configs
|
mkdir -p /run/named/dhcp-configs
|
||||||
|
chmod g+w /run/named/dhcp-configs
|
||||||
echo "// FILE GENERATED BY bind.service's ExecStartPre: CHANGES TO THIS FILE WILL BE OVERWRITTEN" > /run/named/dhcp-configs.conf
|
echo "// FILE GENERATED BY bind.service's ExecStartPre: CHANGES TO THIS FILE WILL BE OVERWRITTEN" > /run/named/dhcp-configs.conf
|
||||||
for c in $(ls /run/named/dhcp-configs/); do
|
for c in $(ls /run/named/dhcp-configs/); do
|
||||||
cat "/run/named/dhcp-configs/$c" >> /run/named/dhcp-configs.conf
|
cat "/run/named/dhcp-configs/$c" >> /run/named/dhcp-configs.conf
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
"feedbackd" # moby, so `fbcli` can control vibrator and LEDs
|
"feedbackd" # moby, so `fbcli` can control vibrator and LEDs
|
||||||
"input" # for /dev/input/<xyz>... TODO:is this still necessary?
|
"input" # for /dev/input/<xyz>... TODO:is this still necessary?
|
||||||
"media" # servo
|
"media" # servo
|
||||||
|
"named" # for `sane-vpn {up,down}`
|
||||||
"networkmanager"
|
"networkmanager"
|
||||||
"nixbuild"
|
"nixbuild"
|
||||||
"plugdev" # desko, for ZSA/QMK/udev
|
"plugdev" # desko, for ZSA/QMK/udev
|
||||||
|
@@ -151,11 +151,6 @@ def get_dns_resolvers_for_dev(dev: str) -> list[str]:
|
|||||||
"""
|
"""
|
||||||
passt/pasta can't proxy to e.g. 127.0.0.53, but it can to 127.0.0.1 and anything routable by the device
|
passt/pasta can't proxy to e.g. 127.0.0.53, but it can to 127.0.0.1 and anything routable by the device
|
||||||
"""
|
"""
|
||||||
nameservers = nameservers_from_resolvconf(RESOLVCONF)
|
|
||||||
if nameservers == []:
|
|
||||||
nameservers = [ "127.0.0.1 "] #< libc default if unspecified
|
|
||||||
if "127.0.0.1" in nameservers:
|
|
||||||
return [ "127.0.0.1" ]
|
|
||||||
|
|
||||||
# output looks like IP4.DNS[1]:192.168.0.1
|
# output looks like IP4.DNS[1]:192.168.0.1
|
||||||
nmcli_stdout = subprocess.check_output([
|
nmcli_stdout = subprocess.check_output([
|
||||||
@@ -169,6 +164,15 @@ def get_dns_resolvers_for_dev(dev: str) -> list[str]:
|
|||||||
_fname, ns = line.split(":")
|
_fname, ns = line.split(":")
|
||||||
nameservers.append(ns)
|
nameservers.append(ns)
|
||||||
|
|
||||||
|
if nameservers == []:
|
||||||
|
nameservers = nameservers_from_resolvconf(RESOLVCONF)
|
||||||
|
if nameservers == []:
|
||||||
|
nameservers = [ "127.0.0.1 "] #< libc default if unspecified
|
||||||
|
|
||||||
|
# old logic from when i was using systemd-resolved (127.0.0.53, which pasta couldn't reach). safe to remove?
|
||||||
|
# if "127.0.0.1" in nameservers:
|
||||||
|
# return [ "127.0.0.1" ]
|
||||||
|
|
||||||
return nameservers
|
return nameservers
|
||||||
|
|
||||||
|
|
||||||
@@ -293,7 +297,7 @@ zone . {{
|
|||||||
}};
|
}};
|
||||||
}};
|
}};
|
||||||
'''
|
'''
|
||||||
elif dir == ToggleDir.Down:
|
elif dir_ == ToggleDir.Down:
|
||||||
text = ""
|
text = ""
|
||||||
|
|
||||||
if not os.path.isdir("/run/named/dhcp-configs"):
|
if not os.path.isdir("/run/named/dhcp-configs"):
|
||||||
|
Reference in New Issue
Block a user