diff --git a/buildscript b/buildscript index 3831756..ec9ae64 100755 --- a/buildscript +++ b/buildscript @@ -31,7 +31,7 @@ OPENWRT_PKGS="gpioctl-sysfs libugpio fastd haserl" BATMAN_ADV=(batman_adv https://github.com/freifunk-gluon/packages.git bdb56bba02168a7fdd7c8bbf380ae59a4febac7c) -BATMAN_ADV_PKGS="kmod-batman-adv-legacy micrond simple-tc" +BATMAN_ADV_PKGS="kmod-batman-adv-legacy micrond simple-tc uradvd" #official openwrt routing packages ROUTING=(routing diff --git a/src/packages/fff/fff-uradvd/Makefile b/src/packages/fff/fff-uradvd/Makefile new file mode 100644 index 0000000..0dce64c --- /dev/null +++ b/src/packages/fff/fff-uradvd/Makefile @@ -0,0 +1,40 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=fff-uradvd +PKG_VERSION:=1 +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/fff-uradvd + +include $(INCLUDE_DIR)/package.mk + +define Package/fff-uradvd + SECTION:=base + CATEGORY:=Freifunk + TITLE:= Freifunk-Franken uradvd + URL:=http://www.freifunk-franken.de + DEPENDS:=+uradvd +endef + +define Package/fff-uradvd/description + This is the uradvd wrapper for the Freifunk Franken Firmware + It is used to configure and start the uradvd daemon. +endef + +define Build/Prepare + echo "all: " > $(PKG_BUILD_DIR)/Makefile +endef + +define Build/Configure + # nothing +endef + +define Build/Compile + # nothing +endef + +define Package/fff-uradvd/install + $(CP) ./files/* $(1)/ +endef + +$(eval $(call BuildPackage,fff-uradvd)) diff --git a/src/packages/fff/fff-uradvd/files/etc/init.d/fff-uradvd b/src/packages/fff/fff-uradvd/files/etc/init.d/fff-uradvd new file mode 100755 index 0000000..c9d8b9d --- /dev/null +++ b/src/packages/fff/fff-uradvd/files/etc/init.d/fff-uradvd @@ -0,0 +1,20 @@ +#!/bin/sh /etc/rc.common + +START=50 + +USE_PROCD=1 + +SERVICE_WRITE_PID=1 +SERVICE_DAEMONIZE=1 + +URADVD_BIN=/usr/sbin/uradvd + +service_triggers() +{ + procd_add_reload_trigger "fff-uradvd" +} + +start_service() { + procd_open_instance + procd_set_param command "$URADVD_BIN" -i br-mesh -p $(uci get network.globals.ula_prefix) +}