From 15beb9234793fd01752d060ad01cc363c9a744be Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 5 Jul 2019 23:21:46 +0200 Subject: ppp-on-up: give hint about mis-usage --- ppp-on-up | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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."); -- cgit v1.2.3-54-g00ecf