introduce gluon-radvd-babel package
This commit is contained in:
parent
1ea8066820
commit
70f00ab5a7
35
package/gluon-radvd-babel/Makefile
Normal file
35
package/gluon-radvd-babel/Makefile
Normal 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))
|
15
package/gluon-radvd-babel/files/etc/init.d/gluon-radvd
Executable file
15
package/gluon-radvd-babel/files/etc/init.d/gluon-radvd
Executable 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
|
||||||
|
}
|
5
package/gluon-radvd-babel/files/lib/gluon/upgrade/500-radvd-remove-user
Executable file
5
package/gluon-radvd-babel/files/lib/gluon/upgrade/500-radvd-remove-user
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/lua
|
||||||
|
|
||||||
|
local users = require 'gluon.users'
|
||||||
|
|
||||||
|
users.remove_user('gluon-radvd')
|
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. /lib/gluon/autoupdater/lib.sh
|
||||||
|
|
||||||
|
|
||||||
|
start_enabled gluon-radvd
|
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. /lib/gluon/autoupdater/lib.sh
|
||||||
|
|
||||||
|
|
||||||
|
stop gluon-radvd
|
Loading…
Reference in New Issue
Block a user