Skip to content

Commit

Permalink
add eq3configd startup file; creates several files (e.g. /var/ids); e…
Browse files Browse the repository at this point in the history
…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.
52 changes: 52 additions & 0 deletions buildroot/buildroot-external/overlay/base/etc/init.d/S50eq3configd
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 $?

0 comments on commit 5cc16b8

Please sign in to comment.