From 40097bddbebbc1ec87560eca0bbe8e4bb586bcb8 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 6 Apr 2007 10:11:19 +0000 Subject: [PATCH] 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. --- packages/irda-utils/files/init | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) 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." ;; *) -- 2.39.5