aboutsummaryrefslogtreecommitdiffstats
path: root/ppp-on-up
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2021-06-23 10:19:59 +0200
committerGravatar Christian Hesse <mail@eworm.de>2021-06-23 10:21:34 +0200
commitaad2e062e5005a1acdc689a4042d8c80d025b667 (patch)
tree7235e91250b3c3612119905e4b806246fb01fc80 /ppp-on-up
parent96a92bb30cb04d23d1536f5d4ddfda353f2d9819 (diff)
ppp-on-up: use 'provides' to find ppp-on-up scripts
Diffstat (limited to 'ppp-on-up')
-rw-r--r--ppp-on-up13
1 files changed, 4 insertions, 9 deletions
diff --git a/ppp-on-up b/ppp-on-up
index fe1492d..e7b2971 100644
--- a/ppp-on-up
+++ b/ppp-on-up
@@ -23,13 +23,8 @@
/ ipv6 dhcp-client release [ find where interface=$IntName !disabled ];
-:local Scripts {
- "update-tunnelbroker"
-}
-
-:foreach Script in=$Scripts do={
- :if ([ :len [ / system script find where name=$Script ] ] > 0) do={
- :log debug ("Running script from ppp-on-up: " . $Script);
- / system script run $Script;
- }
+:foreach Script in=[ / system script find where source~("\n# provides: ppp-on-up\n") ] do={
+ :local ScriptName [ / system script get $Script name ];
+ :log debug ("Running script from ppp-on-up: " . $ScriptName);
+ / system script run $Script;
}