diff options
Diffstat (limited to 'meta/recipes-connectivity')
-rwxr-xr-x | meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/init | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/init b/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/init index b8038e08a3..6f29e9c6ed 100755 --- a/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/init +++ b/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/init | |||
@@ -8,6 +8,10 @@ | |||
8 | # Short-Description: Infrared port support | 8 | # Short-Description: Infrared port support |
9 | ### END INIT INFO | 9 | ### END INIT INFO |
10 | 10 | ||
11 | NAME="irattach" | ||
12 | test -x "$IRDA_DAEMON" || IRDA_DAEMON=/usr/sbin/irattach | ||
13 | test -z "$IRATTACH_PID" && IRATTACH_PID=/var/run/irattach.pid | ||
14 | |||
11 | # Source function library. | 15 | # Source function library. |
12 | . /etc/init.d/functions | 16 | . /etc/init.d/functions |
13 | 17 | ||
@@ -49,30 +53,26 @@ fi | |||
49 | 53 | ||
50 | case "$1" in | 54 | case "$1" in |
51 | start) | 55 | start) |
52 | echo -n "Starting IrDA: " | 56 | echo -n "Starting IrDA: $NAME" |
53 | irattach ${DEVICE} ${ARGS} > /dev/null 2>&1 & | 57 | start-stop-daemon --start --quiet --exec "$IRDA_DAEMON" ${DEVICE} ${ARGS} --pidfile "$IRATTACH_PID" |
54 | echo "$NAME." | 58 | sleep 1 |
55 | ;; | 59 | [ -f /var/run/irattach.pid ] && echo " done" || echo " fail" |
60 | ;; | ||
56 | stop) | 61 | stop) |
57 | echo -n "Stopping IrDA: " | 62 | echo "Stopping IrDA: $NAME" |
58 | killall irattach > /dev/null 2>&1 | 63 | start-stop-daemon --stop --quiet --exec "$IRDA_DAEMON" --pidfile "$IRATTACH_PID" |
59 | echo "$NAME." | 64 | ;; |
60 | ;; | ||
61 | restart|force-reload) | 65 | restart|force-reload) |
62 | echo -n "Restarting IrDA: " | 66 | $0 stop |
63 | irattach ${DEVICE} ${ARGS} > /dev/null 2>&1 & | 67 | $0 start |
64 | sleep 1 | 68 | ;; |
65 | killall irattach > /dev/null 2>&1 | ||
66 | echo "$NAME." | ||
67 | ;; | ||
68 | status) | 69 | status) |
69 | status irattach | 70 | status irattach |
70 | exit $? | 71 | exit $? |
71 | ;; | 72 | ;; |
72 | *) | 73 | *) |
73 | N=/etc/init.d/$NAME | 74 | N=/etc/init.d/$NAME |
74 | echo "Usage: $N {start|stop|restart|force-reload|status}" >&2 | 75 | echo "Usage: $N {start|stop|restart|force-reload|status}" >&2 |
75 | exit 1 | 76 | exit 1 |
76 | ;; | 77 | ;; |
77 | esac | 78 | esac |
78 | |||