summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rwxr-xr-xpackages/irda-utils/files/init55
-rw-r--r--packages/irda-utils/irda-utils_0.9.16.bb4
2 files changed, 32 insertions, 27 deletions
diff --git a/packages/irda-utils/files/init b/packages/irda-utils/files/init
index 2d93af34df..a00596fc85 100755
--- a/packages/irda-utils/files/init
+++ b/packages/irda-utils/files/init
@@ -1,21 +1,26 @@
#! /bin/sh
+NAME="irattach"
+
module_id() {
- awk 'BEGIN { FS=": " } /Hardware/ { print $2 } ' </proc/cpuinfo
+ awk 'BEGIN { FS=": " } /Hardware/ { print $2 } ' </proc/cpuinfo
+}
+cpuid_id() {
+ awk '/Processor/ { print $3; exit; }' /proc/cpuinfo
}
if [ ! -f /etc/sysconfig/irda ]; then
- case `module_id` in
- "HP iPAQ H2200" | "HP iPAQ HX4700" | "HTC Universal")
+ case `cpuid_id` in
+ "XScale-PXA2"*)
IRDA=yes
DEVICE=/dev/ttyS2
DONGLE=
DISCOVERY=
;;
*)
- IRDA=yes
- DEVICE=/dev/ttyS1
+ IRDA=no
+ DEVICE=/dev/null
DONGLE=
DISCOVERY=
;;
@@ -32,8 +37,8 @@ fi
. /etc/sysconfig/irda
-# Check that irda is up.
-[ ${IRDA} = "no" ] && exit 0
+# Check if irda is present.
+[ $IRDA = "no" ] && exit 0
[ -f /usr/sbin/irattach ] || exit 0
@@ -47,26 +52,26 @@ fi
case "$1" in
start)
- echo -n "Starting IrDA: "
- irattach ${DEVICE} ${ARGS} > /dev/null 2>&1 &
- echo "$NAME."
- ;;
+ echo -n "Starting IrDA: "
+ irattach ${DEVICE} ${ARGS} > /dev/null 2>&1
+ echo "$NAME."
+ ;;
stop)
- echo -n "Stopping IrDA: "
- killall irattach > /dev/null 2>&1
- echo "$NAME."
- ;;
+ echo -n "Stopping IrDA: "
+ killall irattach > /dev/null 2>&1
+ echo "$NAME."
+ ;;
restart|force-reload)
- echo -n "Restarting IrDA: "
- irattach ${DEVICE} ${ARGS} > /dev/null 2>&1 &
- sleep 1
- killall irattach > /dev/null 2>&1
- echo "$NAME."
- ;;
+ echo -n "Restarting IrDA: "
+ irattach ${DEVICE} ${ARGS} > /dev/null 2>&1
+ sleep 1
+ killall irattach > /dev/null 2>&1
+ echo "$NAME."
+ ;;
*)
- N=/etc/init.d/$NAME
- echo "Usage: $N {start|stop|restart|force-reload}" >&2
- exit 1
- ;;
+ N=/etc/init.d/$NAME
+ echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
esac
diff --git a/packages/irda-utils/irda-utils_0.9.16.bb b/packages/irda-utils/irda-utils_0.9.16.bb
index ee5580b1de..19bcdf397c 100644
--- a/packages/irda-utils/irda-utils_0.9.16.bb
+++ b/packages/irda-utils/irda-utils_0.9.16.bb
@@ -3,7 +3,7 @@ IrDA allows communication over Infrared with other devices \
such as phones and laptops."
SECTION = "base"
LICENSE = "GPL"
-PR = "r7"
+PR = "r8"
SRC_URI = "${SOURCEFORGE_MIRROR}/irda/irda-utils-${PV}.tar.gz \
file://configure.patch;patch=1 \
@@ -12,7 +12,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/irda/irda-utils-${PV}.tar.gz \
export SYS_INCLUDES="-I${STAGING_INCDIR}"
-inherit autotools update-rc.d
+inherit autotools
INITSCRIPT_NAME = "irattach"
INITSCRIPT_PARAMS = "defaults 20"