[BRLTTY] startup/shutdown question

Didier Spaier didier at slint.fr
Wed Dec 10 06:39:34 EST 2014


To insure a clean startup/shutdown of brltty in Slackware, imitating
what's done for other daemons, I could do this:

_In /etc/rc.d/rc.S, insert this after creation of the devices and before
file systems checks:

if [ -x /etc/rc.d/rc.brltty ]; then
   /etc/rc.d/rc.brltty start
fi

_In the same file we have already this:

# Run any local shutdown scripts:
if [ -x /etc/rc.d/rc.local_shutdown ]; then
   /etc/rc.d/rc.local_shutdown stop
fi

_So I would create the script /etc/rc.d/rc.brltty with this content:

#!/bin/sh
#
# Start/stop brltty
#
brltty_start() {
   if [ -x /bin/brltyt]; then
     echo "Starting brltty daemon: /bin/brltty "
     /bin/brltty 2> /dev/null
   fi
}
brltty_stop() {
   killall brltty 2> /dev/null
}
case "$1" in
'start')
   brltty_start
   ;;
'stop')
   brltty_stop
   ;;
'restart'
   brltty_stop
   sleep1
   brltty_start
   ;;
*)
   echo "usage $0 start|stop|restart"
esac
# End of file /etc/rc.d/rc.brltty

_And in /etc/rc.d/rc.local_shutdown, include this code snippet:
if [ -x /bin/brlty]; then
   /etc/rc.d/brltty stop
fi

What do you think?
In particular:
Is it useful to kill the daemon before shutdown?
are there actual use cases for 'restart'?

TIA and best regards,
Didier


More information about the BRLTTY mailing list