From: Paul Sokolovsky Date: Fri, 6 Apr 2007 10:11:19 +0000 (+0000) Subject: irda-utils: Make service script detect default IrDA port on PXA2xx devices. X-Git-Tag: Release-2010-05/1~8868^2~776^2~4 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40097bddbebbc1ec87560eca0bbe8e4bb586bcb8;p=openembedded.git irda-utils: Make service script detect default IrDA port on PXA2xx devices. * Some issue is that some PXA2xx devices use ttyS2 for non-IrDA, these should be added to case *before* '"XScale-PXA2"*'. This should not be a problem as irattach is no longer started on boot, only manually. * Otherwise, assume that default is no IrDA, not some random serial port. * A bit of reformatting, too. --- diff --git a/packages/irda-utils/files/init b/packages/irda-utils/files/init index 2d93af34df..1944b9d782 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 } ' /dev/null 2>&1 & + irattach ${DEVICE} ${ARGS} > /dev/null 2>&1 echo "$NAME." ;; stop) echo -n "Stopping IrDA: " - killall irattach > /dev/null 2>&1 + killall irattach > /dev/null 2>&1 echo "$NAME." ;; restart|force-reload) echo -n "Restarting IrDA: " - irattach ${DEVICE} ${ARGS} > /dev/null 2>&1 & + irattach ${DEVICE} ${ARGS} > /dev/null 2>&1 sleep 1 - killall irattach > /dev/null 2>&1 + killall irattach > /dev/null 2>&1 echo "$NAME." ;; *)