aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2019-01-04 13:02:34 +0100
committerGravatar Christian Hesse <mail@eworm.de>2019-01-04 13:02:34 +0100
commitc3f27bf7769e539c7b3437799df51f4b90c864ca (patch)
tree91a7a9ad35da12861896cc0f27ac2d317c7e49dc
parent870f00bb36f5af3088344371764da48bbde9651a (diff)
ppp-on-up: fix variable handling
The variable $interface is not a name but a reference... Basically this worked only because of the oddity - the filter did not work and *all* dhcp-clients were disabled and enabled.
-rw-r--r--ppp-on-up4
1 files changed, 3 insertions, 1 deletions
diff --git a/ppp-on-up b/ppp-on-up
index 761154a..af99af1 100644
--- a/ppp-on-up
+++ b/ppp-on-up
@@ -6,8 +6,10 @@
# variable $interface is available in ppp on-up script
:local Interface $interface;
-:local DhcpClient [ / ipv6 dhcp-client find where interface=$Interface ];
+:local IntName [ / interface get $Interface name ];
+:log info ("PPP interface " . $IntName . " is up.");
+:local DhcpClient [ / ipv6 dhcp-client find where interface=$IntName ];
:if ([ :len $DhcpClient ] > 0) do={
/ ipv6 dhcp-client disable $DhcpClient;
:delay 1s;