Skip to content

Commit

Permalink
Revert "replace all tabs by spaces."
Browse files Browse the repository at this point in the history
This reverts commit 03bc331.
  • Loading branch information
jens-maus committed Sep 25, 2023
1 parent d4e5f92 commit 170ab17
Showing 1 changed file with 40 additions and 41 deletions.
81 changes: 40 additions & 41 deletions buildroot-external/package/eq3configd/S50eq3configd
Original file line number Diff line number Diff line change
Expand Up @@ -9,61 +9,60 @@ PIDFILE="/var/run/${DAEMON}.pid"

init () {

# we output the BidCos-Address and the
# SerialNumber to /var/ids
echo "BidCoS-Address=$(cat /var/rf_address)" >/var/ids
echo "SerialNumber=$(cat /var/board_serial)" >>/var/ids
# we output the BidCos-Address and the
# SerialNumber to /var/ids
echo "BidCoS-Address=$(cat /var/rf_address)" >/var/ids
echo "SerialNumber=$(cat /var/board_serial)" >>/var/ids

# in case we have a BidCos-RF device (no empty /var/rf_address)
# and there is no already existing /etc/config/ids we have to
# copy it over
if [[ -s /var/rf_address ]] && [[ ! -e /etc/config/ids ]] ; then
cp /var/ids /etc/config/
fi
# in case we have a BidCos-RF device (no empty /var/rf_address)
# and there is no already existing /etc/config/ids we have to
# copy it over
if [[ -s /var/rf_address ]] && [[ ! -e /etc/config/ids ]] ; then
cp /var/ids /etc/config/
fi

# make sure crypttool.cfg exists and has secure permissions
if [[ ! -e /etc/config/crypttool.cfg ]] ; then
touch /etc/config/crypttool.cfg
fi
chmod 0640 /etc/config/crypttool.cfg
chgrp eq3cfg /etc/config/crypttool.cfg
# make sure crypttool.cfg exists and has secure permissions
if [[ ! -e /etc/config/crypttool.cfg ]] ; then
touch /etc/config/crypttool.cfg
fi
chmod 0640 /etc/config/crypttool.cfg
chgrp eq3cfg /etc/config/crypttool.cfg
}

start() {
echo -n "Starting ${DAEMON}: "
init
echo -n "Starting ${DAEMON}: "
init

# adjust the oom score (which is inherited by start-stop-daemon)
# to ensure that others are killed first in case of low memory situations
echo -900 >/proc/$$/oom_score_adj 2> /dev/null
# adjust the oom score (which is inherited by start-stop-daemon)
# to ensure that others are killed first in case of low memory situations
echo -900 >/proc/$$/oom_score_adj 2> /dev/null

start-stop-daemon -S -q -b -m -c eq3cfg:eq3cfg -p ${PIDFILE} --exec /bin/${DAEMON}
echo "OK"
start-stop-daemon -S -q -b -m -c eq3cfg:eq3cfg -p ${PIDFILE} --exec /bin/${DAEMON}
}
stop() {
echo -n "Stopping ${DAEMON}: "
start-stop-daemon -K -q -p ${PIDFILE}
rm -f ${PIDFILE}
echo "OK"
echo -n "Stopping ${DAEMON}: "
start-stop-daemon -K -q -p ${PIDFILE}
rm -f ${PIDFILE}
echo "OK"
}
restart() {
stop
start
stop
start
}

case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac

exit 0

0 comments on commit 170ab17

Please sign in to comment.