-
-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add eq3configd startup file; creates several files (e.g. /var/ids); e…
…q3configd not yet running
- Loading branch information
Wolfgang Willinghöfer
committed
Aug 21, 2016
1 parent
04c8b8d
commit 5cc16b8
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
buildroot/buildroot-external/overlay/base/etc/init.d/S50eq3configd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/sh | ||
# | ||
# Starts eq3configd. | ||
# | ||
init () { | ||
radio_mac=$(cat /var/rf_address) | ||
board_serial=$(cat /var/board_serial) | ||
echo "BidCoS-Address=$radio_mac" > /var/ids | ||
echo "SerialNumber=$board_serial" >> /var/ids | ||
if [ ! -e /etc/config/ids ] ; then | ||
cp /var/ids /etc/config | ||
fi | ||
|
||
if [ ! -e /etc/config/crypttool.cfg ] ; then | ||
touch /etc/config/crypttool.cfg | ||
fi | ||
} | ||
|
||
start() { | ||
echo -n "Starting eq3configd: " | ||
init | ||
# start-stop-daemon -S -q -p /var/run/eq3configd.pid --exec /bin/eq3configd & | ||
# start-stop-daemon -S -q -p /var/run/ssdpd.pid --exec /bin/ssdpd & | ||
echo "OK" | ||
} | ||
stop() { | ||
echo -n "Stopping eq3configd: " | ||
start-stop-daemon -K -q -p /var/run/eq3configd.pid | ||
echo "OK" | ||
} | ||
restart() { | ||
stop | ||
start | ||
} | ||
|
||
case "$1" in | ||
start) | ||
start | ||
;; | ||
stop) | ||
stop | ||
;; | ||
restart|reload) | ||
restart | ||
;; | ||
*) | ||
echo "Usage: $0 {start|stop|restart}" | ||
exit 1 | ||
esac | ||
|
||
exit $? | ||
|