use set_serial to switch to low latency mode on serial device

This commit is contained in:
john30
2017-05-28 15:59:47 +02:00
parent 4638ff5f17
commit fa4dca7aec
2 changed files with 8 additions and 2 deletions
Executable → Regular
+7 -1
View File
@@ -29,10 +29,16 @@ instance="EBUSD_OPTS$2"
instance=${!instance}
start_instance () {
local opts suffix
local opts suffix dev
opts=$1
shift
suffix="${opts#EBUSD_OPTS}"
dev=`echo " ${!opts}"|sed -e 's#^.* -d ##' -e 's# -.*$##'`
if [ -n "$dev" ] && [ "${dev:0:5}" == '/dev/' ] && [ -c "$dev" ] && [ -x /bin/setserial ]; then
log_daemon_msg "Setting low latency for ebusd${suffix} device"
/bin/setserial "$dev" low_latency
log_end_msg $?
fi
log_daemon_msg "Starting ebusd${suffix}" ebusd
pidfile=$PIDFILE_PREFIX${suffix}$PIDFILE_SUFFIX
start-stop-daemon --start --quiet --oknodo --pidfile $pidfile --exec $DAEMON -- --pidfile $pidfile ${!opts}
Executable → Regular
+1 -1
View File
@@ -70,7 +70,7 @@ Architecture: $ARCH
Maintainer: John Baier <ebusd@ebusd.eu>
Homepage: https://github.com/john30/ebusd
Bugs: https://github.com/john30/ebusd/issues
Depends: libstdc++6 (>= 4.8.1), libc6, libgcc1$extralibs
Depends: setserial, libstdc++6 (>= 4.8.1), libc6, libgcc1$extralibs
Description: eBUS daemon.
ebusd is a daemon for handling communication with eBUS devices connected to a
2-wire bus system.