Moved network configuration script to own package

Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Changed mode of configurenetwork to 755
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
This commit is contained in:
Jan Kraus 2016-05-16 14:26:49 +02:00 committed by Tim Niemeyer
parent 07fa061065
commit 4e145b83b9
4 changed files with 45 additions and 4 deletions

View File

@ -59,9 +59,7 @@ if ! uci get board.model.name; then
uci set board.model.name=$BOARD
fi
. /etc/network.$BOARD
. /etc/network.sh
/usr/sbin/configurenetwork
# Starting NTP-Client Daemon after 30s to ensure that the interface is up
( sleep 30 ; ntpd -p ${NTPD_IP} ) &

View File

@ -0,0 +1,39 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-network
PKG_VERSION:=0.0.1
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/fff-network
include $(INCLUDE_DIR)/package.mk
define Package/fff-network
SECTION:=base
CATEGORY:=Freifunk
TITLE:= Freifunk-Franken network configuration
URL:=http://www.freifunk-franken.de
DEPENDS:=+fff-uradvd
endef
define Package/fff-network/description
This package configures the network interfaces
endef
define Build/Prepare
echo "all: " > $(PKG_BUILD_DIR)/Makefile
endef
define Build/Configure
# nothing
endef
define Build/Compile
# nothing
endef
define Package/fff-network/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,fff-network))

View File

@ -9,6 +9,9 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
BOARD="$(uci get board.model.name)"
. /etc/network.$BOARD
if ! uci get nodewatcher.@network[0].client_interfaces; then
echo "Setting nodewatchers client interfaces to: $CLIENTIF"
uci set nodewatcher.@network[0].client_interfaces="$CLIENTIF"

View File

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