diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-11-15 14:12:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-15 14:12:09 +0100 |
commit | 6d90375db4dd0c9beb2815e8ceae2d6214465f99 (patch) | |
tree | 050292e6ba92248a02948c430ec5da778e90833d /src/etc/ppp/ip-down.d | |
parent | b3e524c29e9f5c8e7536ba86de9097be70fe5fb6 (diff) | |
parent | ff901a52bb9acd4bdd0e3a96033c896e4667a6af (diff) | |
download | vyos-1x-6d90375db4dd0c9beb2815e8ceae2d6214465f99.tar.gz vyos-1x-6d90375db4dd0c9beb2815e8ceae2d6214465f99.zip |
Merge pull request #1659 from vfreex/fix-ns-config-equuleus
backport: T4815: Fix various name server config issues
Diffstat (limited to 'src/etc/ppp/ip-down.d')
-rwxr-xr-x | src/etc/ppp/ip-down.d/98-vyos-pppoe-cleanup-nameservers | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/etc/ppp/ip-down.d/98-vyos-pppoe-cleanup-nameservers b/src/etc/ppp/ip-down.d/98-vyos-pppoe-cleanup-nameservers new file mode 100755 index 000000000..5157469f4 --- /dev/null +++ b/src/etc/ppp/ip-down.d/98-vyos-pppoe-cleanup-nameservers @@ -0,0 +1,14 @@ +#!/bin/bash + +interface=$6 +if [ -z "$interface" ]; then + exit +fi + +if ! /usr/bin/systemctl -q is-active vyos-hostsd; then + exit # vyos-hostsd is not running +fi + +hostsd_client="/usr/bin/vyos-hostsd-client" +$hostsd_client --delete-name-servers --tag "dhcp-$interface" +$hostsd_client --apply |