aboutsummaryrefslogtreecommitdiffstats
path: root/ppp-on-up
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2019-07-05 23:21:46 +0200
committerGravatar Christian Hesse <mail@eworm.de>2019-07-05 23:21:46 +0200
commit15beb9234793fd01752d060ad01cc363c9a744be (patch)
tree040ff2510a26e08f59d600bc92ec6d818307a634 /ppp-on-up
parent894ee65675ee846bd0c7d98e75b261cf5d6b35cc (diff)
ppp-on-up: give hint about mis-usage
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.");