Browse Source

- avoid annoying console messages when /dev/dbox/oled0 not exists

master
vanhofen 4 years ago
parent
commit
81b1d3c046
  1. 7
      package/neutrino/files/start_neutrino.armbox
  2. 2
      package/sysvinit/files/rcS-hd5x
  3. 2
      package/sysvinit/files/rcS-hd6x
  4. 2
      package/sysvinit/files/rcS-vuduo
  5. 8
      skel-root/general/scripts/init.functions

7
package/neutrino/files/start_neutrino.armbox

@ -1,6 +1,7 @@
#!/bin/sh #!/bin/sh
. /etc/init.d/globals . /etc/init.d/globals
. /etc/init.d/functions
# Neutrino's exit codes # Neutrino's exit codes
ERROR=-1 ERROR=-1
@ -20,12 +21,12 @@ do_cleanup() {
} }
do_shutdown() { do_shutdown() {
echo "Shutdown ..." > /dev/dbox/oled0 display_msg "Shutdown ..."
poweroff poweroff
} }
do_reboot() { do_reboot() {
echo "Reboot ..." > /dev/dbox/oled0 display_msg "Reboot ..."
reboot reboot
} }
@ -52,7 +53,7 @@ while true; do
break break
fi fi
echo "Neutrino: $RET" > /dev/dbox/oled0 display_msg "Neutrino: $RET"
# report errors on external display # report errors on external display
if [ -e /tmp/.lcd-* ]; then if [ -e /tmp/.lcd-* ]; then

2
package/sysvinit/files/rcS-hd5x

@ -89,7 +89,7 @@ service network start
service ntpdate start service ntpdate start
# say hi to everyone # say hi to everyone
echo "Booting... NI" > /dev/dbox/oled0 display_msg "Booting... NI"
# trap CTRL-C only in this shell so we can interrupt subprocesses # trap CTRL-C only in this shell so we can interrupt subprocesses
trap ":" INT QUIT TSTP trap ":" INT QUIT TSTP

2
package/sysvinit/files/rcS-hd6x

@ -89,7 +89,7 @@ service network start
service ntpdate start service ntpdate start
# say hi to everyone # say hi to everyone
echo "Booting... NI" > /dev/dbox/oled0 display_msg "Booting... NI"
# trap CTRL-C only in this shell so we can interrupt subprocesses # trap CTRL-C only in this shell so we can interrupt subprocesses
trap ":" INT QUIT TSTP trap ":" INT QUIT TSTP

2
package/sysvinit/files/rcS-vuduo

@ -84,7 +84,7 @@ service network start
service ntpdate start service ntpdate start
# say hi to everyone # say hi to everyone
echo "Booting... NI" > /dev/dbox/oled0 display_msg "Booting... NI"
# trap CTRL-C only in this shell so we can interrupt subprocesses # trap CTRL-C only in this shell so we can interrupt subprocesses
trap ":" INT QUIT TSTP trap ":" INT QUIT TSTP

8
skel-root/general/scripts/init.functions

@ -71,6 +71,14 @@ load_module()
fi fi
} }
display_msg()
{
msg="$*"
if [ -e /dev/dbox/oled0 ]; then
echo "${msg}" > /dev/dbox/oled0
fi
}
get_setting() get_setting()
{ {
test -e $NEUTRINO_CONF && grep "^${1}=" $NEUTRINO_CONF | cut -d'=' -f2 test -e $NEUTRINO_CONF && grep "^${1}=" $NEUTRINO_CONF | cut -d'=' -f2

Loading…
Cancel
Save