aboutsummaryrefslogtreecommitdiff
path: root/network/irda-utils/rc.irda.new
diff options
context:
space:
mode:
authorMichael Wagner <lapinours@web.de>2010-05-11 15:01:29 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-11 15:01:29 +0200
commit18025e4903d384578f2272e5dab27963228d25da (patch)
tree3866422c251bab643011c3f55b22b3724f819afc /network/irda-utils/rc.irda.new
parentc6d33cd2e16f2aa850e7d3bf48a990277e61e168 (diff)
network/irda-utils: Initial import
Diffstat (limited to 'network/irda-utils/rc.irda.new')
-rw-r--r--network/irda-utils/rc.irda.new46
1 files changed, 46 insertions, 0 deletions
diff --git a/network/irda-utils/rc.irda.new b/network/irda-utils/rc.irda.new
new file mode 100644
index 0000000000000..88b62eff0a641
--- /dev/null
+++ b/network/irda-utils/rc.irda.new
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+# Start/stop/restart the irda daemon:
+#
+# This script is based on irda-utils' sysv-init script and
+# only covers SIR mode. For detailed instructionis on how
+# to enable FIR mode see 'man 8 irattach' and README.irattach
+# in the doc directory.
+
+# You probably have to choose a different serial port (/dev/ttyS?).
+DEVICE=/dev/ttyS1
+DISCOVERY=yes
+#DONGLE=actisys+
+
+[ -f /usr/sbin/irattach ] || exit 0
+
+ARGS=
+if [ $DONGLE ]; then
+ ARGS="$ARGS -d $DONGLE"
+fi
+if [ "$DISCOVERY" = "yes" ];then
+ ARGS="$ARGS -s"
+fi
+
+# See how we were called.
+case "$1" in
+ start)
+ # Attach irda device
+ echo "Starting IrDA: /usr/sbin/irattach"
+ /usr/sbin/irattach ${DEVICE} ${ARGS}
+ ;;
+ stop)
+ # Stop service.
+ echo "Stopping IrDA... "
+ killall irattach
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: irda {start|stop|restart}"
+ exit 1
+esac
+
+exit 0