From 65ee128c3782f9972c6e0ea1a3806c00947dbce8 Mon Sep 17 00:00:00 2001 From: Christof Schulze Date: Wed, 27 Jul 2016 01:22:57 +0200 Subject: [PATCH] gluon-radvd: externalize arguments The arguments are now provided by gluon-mesh-batman-adv-core, so gluon-radvd can be used with other mesh protocols. [Matthias Schiffer: removed PROVIDES dependency] --- .../files/lib/gluon/ebtables/300-radv-input-output | 0 .../files/lib/gluon/radvd/arguments | 3 +++ package/gluon-radvd/Makefile | 2 +- package/gluon-radvd/files/etc/init.d/gluon-radvd | 4 +++- 4 files changed, 7 insertions(+), 2 deletions(-) rename package/{gluon-radvd => gluon-mesh-batman-adv-core}/files/lib/gluon/ebtables/300-radv-input-output (100%) create mode 100755 package/gluon-mesh-batman-adv-core/files/lib/gluon/radvd/arguments diff --git a/package/gluon-radvd/files/lib/gluon/ebtables/300-radv-input-output b/package/gluon-mesh-batman-adv-core/files/lib/gluon/ebtables/300-radv-input-output similarity index 100% rename from package/gluon-radvd/files/lib/gluon/ebtables/300-radv-input-output rename to package/gluon-mesh-batman-adv-core/files/lib/gluon/ebtables/300-radv-input-output diff --git a/package/gluon-mesh-batman-adv-core/files/lib/gluon/radvd/arguments b/package/gluon-mesh-batman-adv-core/files/lib/gluon/radvd/arguments new file mode 100755 index 00000000..4062748a --- /dev/null +++ b/package/gluon-mesh-batman-adv-core/files/lib/gluon/radvd/arguments @@ -0,0 +1,3 @@ +#!/usr/bin/lua +local site = require "gluon.site_config" +print("-i br-client -p " .. site.prefix6) diff --git a/package/gluon-radvd/Makefile b/package/gluon-radvd/Makefile index 3c126fe1..0ca18177 100644 --- a/package/gluon-radvd/Makefile +++ b/package/gluon-radvd/Makefile @@ -12,7 +12,7 @@ define Package/gluon-radvd SECTION:=gluon CATEGORY:=Gluon TITLE:=Advertise an IPv6 prefix from the node - DEPENDS:=+gluon-core +gluon-ebtables +gluon-mesh-batman-adv +uradvd + DEPENDS:=+gluon-core +uradvd endef define Package/gluon-radvd/description diff --git a/package/gluon-radvd/files/etc/init.d/gluon-radvd b/package/gluon-radvd/files/etc/init.d/gluon-radvd index d7a981d4..5e0f5962 100755 --- a/package/gluon-radvd/files/etc/init.d/gluon-radvd +++ b/package/gluon-radvd/files/etc/init.d/gluon-radvd @@ -7,7 +7,9 @@ SERVICE_DAEMONIZE=1 start() { - service_start /usr/sbin/uradvd -i br-client -p $(lua -e 'print(require("gluon.site_config").prefix6)') + [ -x /lib/gluon/radvd/arguments ] && { + service_start /usr/sbin/uradvd $(/lib/gluon/radvd/arguments) + } } stop() {