introduce gluon-radvd-babel package

This commit is contained in:
Christof Schulze 2016-05-02 01:41:12 +02:00
parent 1ea8066820
commit 70f00ab5a7
5 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,35 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-radvd-babel
PKG_VERSION:=4
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/gluon-radvd-babel
SECTION:=gluon
CATEGORY:=Gluon
TITLE:=Advertise an IPv6 prefix from the node
DEPENDS:=+gluon-core +gluon-mesh-babel +uradvd
endef
define Package/gluon-radvd-babel/description
Gluon community wifi mesh firmware framework: Advertise an IPv6 prefix from the node
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/gluon-radvd-babel/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,gluon-radvd-babel))

View File

@ -0,0 +1,15 @@
#!/bin/sh /etc/rc.common
START=50
SERVICE_WRITE_PID=1
SERVICE_DAEMONIZE=1
start() {
service_start /usr/sbin/uradvd -i local-node -a $(lua -e 'print(require("gluon.site_config").prefix6)') --default-lifetime 900
}
stop() {
service_stop /usr/sbin/uradvd
}

View File

@ -0,0 +1,5 @@
#!/usr/bin/lua
local users = require 'gluon.users'
users.remove_user('gluon-radvd')

View File

@ -0,0 +1,6 @@
#!/bin/sh
. /lib/gluon/autoupdater/lib.sh
start_enabled gluon-radvd

View File

@ -0,0 +1,6 @@
#!/bin/sh
. /lib/gluon/autoupdater/lib.sh
stop gluon-radvd