adds a 'support' package for scripts not neccessary

First functionality is the possibility to have a file
/etc/init.d/fff-userconfig on the nodes that is execeuted
on each reboot and survives sysupgrades

Signed-off-by: Tobias Klaus <tk+ff@meskal.net>
- Whitespaces fixed
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
This commit is contained in:
Tobias Klaus 2016-05-04 09:47:30 +02:00 committed by Tim Niemeyer
parent ebd863c23e
commit 24c70bdd57
3 changed files with 57 additions and 1 deletions

View File

@ -0,0 +1,41 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-support
PKG_VERSION:=0.0.1
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/fff-support
include $(INCLUDE_DIR)/package.mk
define Package/fff-support
SECTION:=base
CATEGORY:=Freifunk
TITLE:=Freifunk-Franken Support Scripts
URL:=http://www.freifunk-franken.de
DEPENDS:=+@BUSYBOX_CONFIG_ASH
endef
define Package/fff-support/description
This is the Freifunk Franken Firmware support package.
This packages provides smaller convenience scripts,
not essential to the operation of the Firmware
endef
define Build/Prepare
echo "all: " > $(PKG_BUILD_DIR)/Makefile
endef
define Build/Configure
# nothing
endef
define Build/Compile
# nothing
endef
define Package/fff-support/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,fff-support))

View File

@ -0,0 +1,14 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=96
boot() {
LOCALCONFIGSCRIPT="/etc/rc.local.fff_userconfig"
#add LOCALCONFIGSCRIPT to sysupgrade regardless if it already exists or not to prevent data loss
grep -q ^"${LOCALCONFIGSCRIPT}"$ /etc/sysupgrade.conf || echo "$LOCALCONFIGSCRIPT" >> /etc/sysupgrade.conf
# process user commands
[ -f "${LOCALCONFIGSCRIPT}" ] && {
sh /etc/rc.local.fff_userconfig
}
}

View File

@ -20,7 +20,8 @@ define Package/fff-base
+fff-uradvd \
+fff-batman-adv-legacy \
+fff-fastd \
+fff-firewall
+fff-firewall \
+fff-support
endef
define Package/fff-base/description