summaryrefslogtreecommitdiffstats
path: root/package/network/ipv6/6relayd/files
diff options
context:
space:
mode:
Diffstat (limited to 'package/network/ipv6/6relayd/files')
-rwxr-xr-xpackage/network/ipv6/6relayd/files/6relayd-update3
-rw-r--r--package/network/ipv6/6relayd/files/6relayd.init20
2 files changed, 22 insertions, 1 deletions
diff --git a/package/network/ipv6/6relayd/files/6relayd-update b/package/network/ipv6/6relayd/files/6relayd-update
new file mode 100755
index 000000000..20980f222
--- /dev/null
+++ b/package/network/ipv6/6relayd/files/6relayd-update
@@ -0,0 +1,3 @@
+#!/bin/sh
+# Make dnsmasq reread hostfile
+killall -SIGHUP dnsmasq
diff --git a/package/network/ipv6/6relayd/files/6relayd.init b/package/network/ipv6/6relayd/files/6relayd.init
index f6d518371..b26d6c5e3 100644
--- a/package/network/ipv6/6relayd/files/6relayd.init
+++ b/package/network/ipv6/6relayd/files/6relayd.init
@@ -1,11 +1,23 @@
#!/bin/sh /etc/rc.common
# Copyright (c) 2011-2012 OpenWrt.org
START=80
+args=""
+
+add_static_lease() {
+ local cfg="$1"
+
+ local duid id
+ config_get duid "$cfg" duid
+ config_get id "$cfg" id
+
+ [ -n "$duid" -a -n "$id" ] && append args "-a$duid:$id"
+
+}
start_6relayd() {
local cfg="$1"
local mode="$2"
- local args=""
+ args="-l/tmp/hosts/6relayd,/usr/sbin/6relayd-update"
SERVICE_DAEMONIZE=1
SERVICE_WRITE_PID=1
@@ -79,6 +91,12 @@ start_6relayd() {
config_get_bool compat_ula "$cfg" compat_ula 0
[ "$compat_ula" -eq 1 ] && append args "-c"
+ local management_level
+ config_get management_level "$cfg" management_level
+ [ -n "$management_level" ] && append args "-m$management_level"
+
+ config_foreach add_static_lease lease
+
[ "$ndp" = "relay" ] && append args "-N -s"
[ "$rd" = "relay" ] && append args "-Rrelay"
[ "$rd" = "server" ] && append args "-Rserver"