Added second OpenWrt routing packages feed. * one feed for batman-adv (revision of latest supported COMPAT_VERSION 14 version) * one feed for all other packages than batman-adv (current revision)

Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
This commit is contained in:
Steffen Pankratz 2015-10-13 21:57:34 +02:00 committed by Tim Niemeyer
parent 12eeaf3128
commit 222111a219
2 changed files with 11 additions and 77 deletions

View File

@ -1,70 +0,0 @@
From 8b91b906261348642731731ca94532d8b3455f2c Mon Sep 17 00:00:00 2001
From: Gui Iribarren <gui@altermundi.net>
Date: Fri, 13 Dec 2013 16:05:26 -0300
Subject: [PATCH] alfred: workaround race condition when batmanif is not ready
at boot time
Wait up to 30 seconds during init.d script on boot, so that batmanif can
come up. If the timeout is reached, the init.d script refuses to start
alfred and related daemons.
This prevents an alfred crash when it would start during early boot, before
batmanif is available. Instead, alfred is started as soon as batmanif appears,
if that happens during the 30-second window.
Signed-off-by: Gui Iribarren <gui@altermundi.net>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Conflicts:
alfred/Makefile
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
---
alfred/files/alfred.init | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/alfred/files/alfred.init b/alfred/files/alfred.init
index e52a7bd..cdb4fff 100755
--- a/alfred/files/alfred.init
+++ b/alfred/files/alfred.init
@@ -16,6 +16,7 @@ pid_file_alfred="/var/run/alfred.pid"
pid_file_vis="/var/run/vis.pid"
enable=0
vis_enable=0
+batmanif=""
SERVICE_DAEMONIZE=1
SERVICE_WRITE_PID=1
@@ -23,7 +24,7 @@ alfred_start()
{
local args=""
local section="$1"
- local disabled interface mode batmanif
+ local disabled interface mode
# check if section is disabled
config_get_bool disabled "$section" disabled 0
@@ -62,6 +63,21 @@ start()
if [ "$enable" = "0" ]; then
exit 0
fi
+
+ mesh_dir="/sys/class/net/$batmanif/mesh/"
+ if ! [ -d "$mesh_dir" ] ; then
+ timeout=30
+ echo "${initscript}: waiting $timeout secs for $batmanif interface..."
+ for i in $(seq $timeout); do
+ sleep 1
+ [ -d "$mesh_dir" ] && break
+ if [ $i == $timeout ] ; then
+ echo "${initscript}: $batmanif not detected, alfred not starting."
+ exit 1
+ fi
+ done
+ fi
+
echo "${initscript}: starting alfred"
SERVICE_PID_FILE="$pid_file_alfred"
service_start /usr/sbin/alfred ${alfred_args}
--
2.1.4

View File

@ -19,22 +19,26 @@ OPENWRT_OLDPACKAGES=(openwrt_oldpackages
http://git.openwrt.org/14.07/packages.git
ee10403aab0b9b23096532662471e8052377444c)
#official openwrt routing packages
## Be careful: FFF uses COMPAT_VERSION 14 at the moment.
## see http://www.open-mesh.org/projects/batman-adv/wiki/Compatversion
## See http://www.open-mesh.org/projects/batman-adv/wiki/Compatversion
BATMAN_ADV=(batman_adv
https://github.com/openwrt-routing/packages.git
44318d05898069300ce2ad6eb05eb40f232e7123
../../../build_patches/0001-batman-adv-no-rebroadcast-option.patch)
BATMAN_ADV_PKGS="kmod-batman-adv"
#official openwrt routing packages
ROUTING=(routing
https://github.com/openwrt-routing/packages.git
44318d05898069300ce2ad6eb05eb40f232e7123
../../../build_patches/0001-batman-adv-no-rebroadcast-option.patch
../../../build_patches/0002-alfred-workaround-race-condition-when-batmanif-is-no.patch)
ROUTING_PKGS="kmod-batman-adv alfred"
ad556e87598f9b2a1561900b882f385137ff85e4)
ROUTING_PKGS="alfred"
FASTD=(fastd
git://git.universe-factory.net/fastd
v17)
FASTD_PKGS="fastd"
FEEDS=(OPENWRT OPENWRT_OLDPACKAGES ROUTING FASTD)
FEEDS=(OPENWRT OPENWRT_OLDPACKAGES ROUTING FASTD BATMAN_ADV)
checkout_git(){
local DIRECTORY=$1