diff --git a/contrib/debian/init.d/ebusd b/contrib/debian/init.d/ebusd old mode 100755 new mode 100644 index 356fd1f0..34e3d3e0 --- a/contrib/debian/init.d/ebusd +++ b/contrib/debian/init.d/ebusd @@ -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} diff --git a/make_debian.sh b/make_debian.sh old mode 100755 new mode 100644 index 3bed6750..3eddd10f --- a/make_debian.sh +++ b/make_debian.sh @@ -70,7 +70,7 @@ Architecture: $ARCH Maintainer: John Baier 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.