aboutsummaryrefslogtreecommitdiffstats
path: root/ppp-on-up
diff options
context:
space:
mode:
Diffstat (limited to 'ppp-on-up')
-rw-r--r--ppp-on-up7
1 files changed, 6 insertions, 1 deletions
diff --git a/ppp-on-up b/ppp-on-up
index 629e340..7fb80d9 100644
--- a/ppp-on-up
+++ b/ppp-on-up
@@ -4,8 +4,13 @@
#
# run scripts on ppp up
-# variable $interface is available in ppp on-up script
:local Interface $interface;
+
+:if ([ :typeof $Interface ] = "nothing") do={
+ :log error "This script is supposed to run from ppp on-up script hook.";
+ :error "Error: See log for details.";
+}
+
:local IntName [ / interface get $Interface name ];
:log info ("PPP interface " . $IntName . " is up.");