Hello,

... patch attached ... (need more sleep)


Kind regards,
Lee Garrett

--- /etc/init.d/lirc.orig	2007-02-18 12:48:27.000000000 +0100
+++ /etc/init.d/lirc	2007-07-17 01:16:12.000000000 +0200
@@ -8,7 +8,7 @@
 
 	for mod in $*
 	do
-		modprobe -k $mod 2> /dev/null || MODULES_MISSING=true
+		modprobe $mod 2> /dev/null || MODULES_MISSING=true
 	done
 
 	if $MODULES_MISSING; then
@@ -65,6 +65,7 @@
 
 START_LIRCMD=true
 START_LIRCD=true
+START_LIREXEC=true
 
 if [ ! -f /etc/lirc/lircd.conf ] \
 	|| grep -q "^#UNCONFIGURED"  /etc/lirc/lircd.conf;then
@@ -77,12 +78,18 @@
 	fi
 	START_LIRCD=false
 	START_LIRCMD=false
+	START_LIREXEC=false
 fi
 if [ ! -f /etc/lirc/lircmd.conf ] \
 	|| grep -q "^#UNCONFIGURED" /etc/lirc/lircmd.conf;then
 	START_LIRCMD=false
 fi
 
+if [ ! -f /etc/lirc/lircrc ] \
+	|| grep -q "^#UNCONFIGURED" /etc/lirc/lircrc;then
+	START_LIREXEC=false
+fi
+
 if [ -f /etc/lirc/hardware.conf ];then
 	. /etc/lirc/hardware.conf
 fi
@@ -105,10 +112,17 @@
       start-stop-daemon --start --quiet --exec /usr/sbin/lircmd \
       		< /dev/null
     fi
+    if $START_IREXEC; then
+      echo -n " irexec"
+      start-stop-daemon --start --quiet --exec /usr/bin/irexec -- -d /etc/lirc/lircrc \
+      		< /dev/null
+    fi
     echo "."
     ;;
   stop)
     echo -n "Stopping lirc daemon:"
+    echo -n " irexec"
+    start-stop-daemon --stop --quiet --exec /usr/bin/irexec
     echo -n " lircmd"
     start-stop-daemon --stop --quiet --exec /usr/sbin/lircmd
     echo -n " lircd"
@@ -116,6 +130,9 @@
     echo "."
     ;;
   reload|force-reload)
+    if $START_IREXEC; then
+      start-stop-daemon --stop --quiet --signal 1 --exec /usr/bin/irexec
+    fi
     if $START_LIRCD; then
       start-stop-daemon --stop --quiet --signal 1 --exec /usr/sbin/lircd
     fi

Reply via email to