forked from freifunk-franken/firmware
24c70bdd57
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>
15 lines
442 B
Bash
Executable File
15 lines
442 B
Bash
Executable File
#!/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
|
|
}
|
|
}
|