mirror of
https://git.openwrt.org/feed/packages.git
synced 2024-06-17 04:44:10 +02:00
lcd4linux: Possibility added that the config can also be loaded from /tmp
Until now, the configuration must be stored under '/etc/lcd4linux.conf'. So that the configuration can also be changed dynamically, it makes sense to store this under /tmp and load them from this directory. The init script first checks whether there is a configuration under '/etc/lcd4linux.conf' and only then does it try to find it under '/tmp/lcd4linux.conf'. If there is no configuration, an error message is shown. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
parent
74bd32f9ff
commit
27b0d3bd11
|
@ -8,7 +8,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=lcd4linux
|
PKG_NAME:=lcd4linux
|
||||||
PKG_RELEASE:=7
|
PKG_RELEASE:=8
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL:=https://github.com/feckert/lcd4linux
|
PKG_SOURCE_URL:=https://github.com/feckert/lcd4linux
|
||||||
|
|
|
@ -5,10 +5,19 @@ START=98
|
||||||
USE_PROCD=1
|
USE_PROCD=1
|
||||||
|
|
||||||
PROG="/usr/bin/lcd4linux"
|
PROG="/usr/bin/lcd4linux"
|
||||||
CONFIGFILE="/etc/lcd4linux.conf"
|
STATIC_CONFIG="/etc/lcd4linux.conf"
|
||||||
|
DYNAMIC_CONFIG="/tmp/lcd4linux.conf"
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
[ -f /etc/lcd4linux.conf ] || return 1
|
if [ -f "$DYNAMIC_CONFIG" ]; then
|
||||||
|
CONFIGFILE="$DYNAMIC_CONFIG"
|
||||||
|
elif [ -f "$STATIC_CONFIG" ]; then
|
||||||
|
CONFIGFILE="$STATIC_CONFIG"
|
||||||
|
else
|
||||||
|
echo "No config found"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
procd_open_instance
|
procd_open_instance
|
||||||
procd_set_param command "$PROG"
|
procd_set_param command "$PROG"
|
||||||
procd_append_param command -F
|
procd_append_param command -F
|
||||||
|
|
Loading…
Reference in New Issue
Block a user