[1/3] fff-hoods: Move configurehood to init.d and start earlier

Submitted by Adrian Schmutzler on April 23, 2019, 11 a.m.

Details

Message ID 20190423110055.4673-1-freifunk@adrianschmutzler.de
State New
Headers show

Commit Message

Adrian Schmutzler April 23, 2019, 11 a.m.
From: Robert Langhammer <rlanghammer@web.de>

This starts configurehood with START=35 and thus before micrond.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
[Start at 35, bump version, whitespace/tab tidyness, fix micrond]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
---
 bsp/default/root_file_system/etc/rc.local                   | 2 --
 src/packages/fff/fff-hoods/Makefile                         | 3 +--
 src/packages/fff/fff-hoods/files/etc/init.d/configurehood   | 8 ++++++++
 src/packages/fff/fff-hoods/files/usr/lib/micron.d/fff-hoods | 2 +-
 4 files changed, 10 insertions(+), 5 deletions(-)
 create mode 100644 src/packages/fff/fff-hoods/files/etc/init.d/configurehood

Patch hide | download patch | download mbox

diff --git a/bsp/default/root_file_system/etc/rc.local b/bsp/default/root_file_system/etc/rc.local
index e02368a5..1243c196 100755
--- a/bsp/default/root_file_system/etc/rc.local
+++ b/bsp/default/root_file_system/etc/rc.local
@@ -2,8 +2,6 @@ 
 # Put your custom commands here that should be executed once
 # the system init finished. By default this file does nothing.
 
-/usr/sbin/configurehood
-
 touch /tmp/started
 
 exit 0
diff --git a/src/packages/fff/fff-hoods/Makefile b/src/packages/fff/fff-hoods/Makefile
index f1a62896..9d0e6786 100644
--- a/src/packages/fff/fff-hoods/Makefile
+++ b/src/packages/fff/fff-hoods/Makefile
@@ -1,8 +1,7 @@ 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fff-hoods
-PKG_VERSION:=5
-PKG_RELEASE:=1
+PKG_RELEASE:=6
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
 
diff --git a/src/packages/fff/fff-hoods/files/etc/init.d/configurehood b/src/packages/fff/fff-hoods/files/etc/init.d/configurehood
new file mode 100644
index 00000000..acce29d8
--- /dev/null
+++ b/src/packages/fff/fff-hoods/files/etc/init.d/configurehood
@@ -0,0 +1,8 @@ 
+#!/bin/sh /etc/rc.common
+
+START=35
+
+boot()
+{
+	/usr/sbin/configurehood
+}
diff --git a/src/packages/fff/fff-hoods/files/usr/lib/micron.d/fff-hoods b/src/packages/fff/fff-hoods/files/usr/lib/micron.d/fff-hoods
index 997e4b76..ac198b57 100644
--- a/src/packages/fff/fff-hoods/files/usr/lib/micron.d/fff-hoods
+++ b/src/packages/fff/fff-hoods/files/usr/lib/micron.d/fff-hoods
@@ -1 +1 @@ 
-3-59/5 * * * * /bin/sleep $(/usr/bin/random 1 15); [ -f /tmp/started ] && /usr/sbin/configurehood
+3-59/5 * * * * /bin/sleep $(/usr/bin/random 1 15); /usr/sbin/configurehood