Annotation of /trunk/usbip/usbipd.rc
Parent Directory | Revision Log
Revision 1528 -
(hide annotations)
(download)
Mon Sep 19 15:56:15 2011 UTC (13 years, 1 month ago) by niro
File size: 870 byte(s)
Mon Sep 19 15:56:15 2011 UTC (13 years, 1 month ago) by niro
File size: 870 byte(s)
-added rc script for usbipd
1 | niro | 1528 | #!/bin/bash |
2 | # $Id$ | ||
3 | |||
4 | #%rlevels: 3:s 4:s 5:s 0:k 1:k 2:k 6:k | ||
5 | #%start: 90 | ||
6 | #%stop: 20 | ||
7 | |||
8 | #deps | ||
9 | #%needs: | ||
10 | #%before: | ||
11 | #%after: | ||
12 | |||
13 | source /etc/conf.d/rc | ||
14 | source $rc_functions | ||
15 | |||
16 | case "$1" in | ||
17 | start) | ||
18 | rc_print "Starting USB over TCP/IP Enumerator daemon ..." | ||
19 | start-stop-daemon --start --exec /usr/bin/usbipd --pidfile /var/run/usbipd.pid --make-pidfile -- -D | ||
20 | evaluate_retval | ||
21 | |||
22 | update_svcstatus $1 | ||
23 | splash svc_started "$(basename $0)" 0 | ||
24 | ;; | ||
25 | |||
26 | stop) | ||
27 | rc_print "Stopping USB over TCP/IP Enumerator daemon ..." | ||
28 | start-stop-daemon --stop --pidfile /var/run/usbipd.pid | ||
29 | if [[ ! -z $(pidof usbipd) ]] | ||
30 | then | ||
31 | killall usbipd | ||
32 | fi | ||
33 | evaluate_retval | ||
34 | |||
35 | update_svcstatus $1 | ||
36 | splash svc_stopped "$(basename $0)" 0 | ||
37 | ;; | ||
38 | |||
39 | restart) | ||
40 | $0 stop | ||
41 | sleep 1 | ||
42 | $0 start | ||
43 | ;; | ||
44 | |||
45 | status) | ||
46 | statusproc /usr/bin/usbipd | ||
47 | ;; | ||
48 | |||
49 | *) | ||
50 | rc_echo "Usage: $0 {start|stop|restart|status}" | ||
51 | exit 1 | ||
52 | ;; | ||
53 | esac |