aboutsummaryrefslogtreecommitdiffstats
path: root/ipv6-update
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2019-07-05 16:09:49 +0200
committerGravatar Christian Hesse <mail@eworm.de>2019-07-05 16:09:49 +0200
commit894ee65675ee846bd0c7d98e75b261cf5d6b35cc (patch)
tree6e863b45bde3a346270d3466e0b6dc4ac5e1acbb /ipv6-update
parent1272fe1cb163f97b418d60a87efd6e229f357e03 (diff)
ipv6-update: give hint about mis-usage
Diffstat (limited to 'ipv6-update')
-rw-r--r--ipv6-update5
1 files changed, 5 insertions, 0 deletions
diff --git a/ipv6-update b/ipv6-update
index 1b52efc..869daf3 100644
--- a/ipv6-update
+++ b/ipv6-update
@@ -6,6 +6,11 @@
:local PdPrefix $"pd-prefix";
+:if ([ :typeof $PdPrefix ] = "nothing") do={
+ :log error "This script is supposed to run from ipv6 dhcp-client.";
+ :error "Error: See log for details.";
+}
+
:local Pool [ / ipv6 pool get [ find where prefix=$PdPrefix ] name ];
:local AddrList [ / ipv6 firewall address-list find where comment=("ipv6-pool-" . $Pool) ];
:local OldPrefix [ / ipv6 firewall address-list get $AddrList address ];