summaryrefslogtreecommitdiffstats
path: root/openembedded/packages/irda-utils
diff options
context:
space:
mode:
Diffstat (limited to 'openembedded/packages/irda-utils')
-rwxr-xr-xopenembedded/packages/irda-utils/files/init55
-rw-r--r--openembedded/packages/irda-utils/irda-utils_0.9.16.bb2
2 files changed, 50 insertions, 7 deletions
diff --git a/openembedded/packages/irda-utils/files/init b/openembedded/packages/irda-utils/files/init
index f644e59295..9becfcc0ed 100755
--- a/openembedded/packages/irda-utils/files/init
+++ b/openembedded/packages/irda-utils/files/init
@@ -1,21 +1,64 @@
1#! /bin/sh 1#! /bin/sh
2 2
3DESC=irattach 3module_id() {
4 awk 'BEGIN { FS=": " } /Hardware/ { print $2 } ' </proc/cpuinfo
5}
6
7if [ ! -f /etc/sysconfig/irda ]; then
8
9 case `module_id` in
10 "HP iPAQ H2200" | "HP iPAQ HX4700")
11 IRDA=yes
12 DEVICE=/dev/ttyS2
13 DONGLE=
14 DISCOVERY=
15 ;;
16 *)
17 IRDA=yes
18 DEVICE=/dev/ttyS1
19 DONGLE=
20 DISCOVERY=
21 ;;
22 esac
23
24 mkdir -p /etc/sysconfig
25 echo "IRDA=$IRDA" > /etc/sysconfig/irda
26 if [ $IRDA = "yes" ]; then
27 echo "DEVICE=$DEVICE" >> /etc/sysconfig/irda
28 echo "DONGLE=$DONGLE" >> /etc/sysconfig/irda
29 echo "DISCOVERY=$DISCOVERY" >> /etc/sysconfig/irda
30 fi
31fi
32
33. /etc/sysconfig/irda
34
35# Check that irda is up.
36[ ${IRDA} = "no" ] && exit 0
37
38[ -f /usr/sbin/irattach ] || exit 0
39
40ARGS=
41if [ $DONGLE ]; then
42 ARGS="$ARGS -d $DONGLE"
43fi
44if [ "$DISCOVERY" = "yes" ];then
45 ARGS="$ARGS -s"
46fi
4 47
5case "$1" in 48case "$1" in
6 start) 49 start)
7 echo -n "Starting $DESC: " 50 echo -n "Starting IrDA: "
8 irattach /dev/ttyS1 > /dev/null 2>&1 & 51 irattach ${DEVICE} ${ARGS} > /dev/null 2>&1 &
9 echo "$NAME." 52 echo "$NAME."
10 ;; 53 ;;
11 stop) 54 stop)
12 echo -n "Stopping $DESC: " 55 echo -n "Stopping IrDA: "
13 killall irattach > /dev/null 2>&1 56 killall irattach > /dev/null 2>&1
14 echo "$NAME." 57 echo "$NAME."
15 ;; 58 ;;
16 restart|force-reload) 59 restart|force-reload)
17 echo -n "Restarting $DESC: " 60 echo -n "Restarting IrDA: "
18 irattach /dev/ttyS1 > /dev/null 2>&1 & 61 irattach ${DEVICE} ${ARGS} > /dev/null 2>&1 &
19 sleep 1 62 sleep 1
20 killall irattach > /dev/null 2>&1 63 killall irattach > /dev/null 2>&1
21 echo "$NAME." 64 echo "$NAME."
diff --git a/openembedded/packages/irda-utils/irda-utils_0.9.16.bb b/openembedded/packages/irda-utils/irda-utils_0.9.16.bb
index 2e09edd841..db56a7044d 100644
--- a/openembedded/packages/irda-utils/irda-utils_0.9.16.bb
+++ b/openembedded/packages/irda-utils/irda-utils_0.9.16.bb
@@ -3,7 +3,7 @@ IrDA allows communication over Infrared with other devices \
3such as phones and laptops." 3such as phones and laptops."
4SECTION = "base" 4SECTION = "base"
5LICENSE = "GPL" 5LICENSE = "GPL"
6PR = "r2" 6PR = "r5"
7 7
8SRC_URI = "${SOURCEFORGE_MIRROR}/irda/irda-utils-${PV}.tar.gz \ 8SRC_URI = "${SOURCEFORGE_MIRROR}/irda/irda-utils-${PV}.tar.gz \
9 file://configure.patch;patch=1 \ 9 file://configure.patch;patch=1 \