summaryrefslogtreecommitdiff
path: root/packages/irda-utils/irda-utils_0.9.16.bb
diff options
context:
space:
mode:
authorMatt Reimer <mattjreimer@gmail.com>2006-01-30 22:06:02 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-01-30 22:06:02 +0000
commite7bd9c51874c4fb5194f02ae104e76cb08fcc7b1 (patch)
tree86d92783e3717df575609615bdefd615095ec353 /packages/irda-utils/irda-utils_0.9.16.bb
parent603329d8d9b8c9128c6d691dcb817182edcaaa0d (diff)
irda-utils: instead of assuming that /dev/ttyS1 is the IrDA port, get the
port and attendant arguments from /etc/sysconfig/irda.
Diffstat (limited to 'packages/irda-utils/irda-utils_0.9.16.bb')
-rw-r--r--packages/irda-utils/irda-utils_0.9.16.bb35
1 files changed, 34 insertions, 1 deletions
diff --git a/packages/irda-utils/irda-utils_0.9.16.bb b/packages/irda-utils/irda-utils_0.9.16.bb
index 2e09edd841..48f43cc999 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 = "r2"
+PR = "r3"
SRC_URI = "${SOURCEFORGE_MIRROR}/irda/irda-utils-${PV}.tar.gz \
file://configure.patch;patch=1 \
@@ -30,3 +30,36 @@ do_install () {
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/irattach
}
+
+pkg_postinst () {
+#!/bin/sh
+
+module_id() {
+ awk 'BEGIN { FS=": " } /Hardware/ { print $2 } ' </proc/cpuinfo
+ }
+
+if [ ! -f /etc/sysconfig/irda ]; then
+
+ case `module_id` in
+ "HP iPAQ H2200")
+ IRDA=yes
+ DEVICE=/dev/tts/2
+ DONGLE=
+ DISCOVERY=
+ ;;
+ *)
+ IRDA=yes
+ DEVICE=/dev/ttyS1
+ DONGLE=
+ DISCOVERY=
+ ;;
+ esac
+
+ echo "IRDA=$IRDA" > /etc/sysconfig/irda
+ if [ $IRDA = "yes" ]; then
+ echo "DEVICE=$DEVICE" >> /etc/sysconfig/irda
+ echo "DONGLE=$DONGLE" >> /etc/sysconfig/irda
+ echo "DISCOVERY=$DISCOVERY" >> /etc/sysconfig/irda
+ fi
+fi
+}