Magellan Linux

Annotation of /trunk/usbip/usbipd.rc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1534 - (hide annotations) (download)
Mon Sep 19 16:28:14 2011 UTC (13 years, 1 month ago) by niro
File size: 1000 byte(s)
-even more silencio
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 niro 1530 #%start: 80
6 niro 1528 #%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 niro 1532 if [[ -z $(grep '^usbip[-_]host' /proc/modules) ]]
19     then
20     modprobe usbip-host &> /dev/null
21     fi
22 niro 1528 rc_print "Starting USB over TCP/IP Enumerator daemon ..."
23 niro 1533 start-stop-daemon --start --quiet --exec /usr/bin/usbipd --pidfile /var/run/usbipd.pid --make-pidfile -- -D
24 niro 1528 evaluate_retval
25    
26     update_svcstatus $1
27     splash svc_started "$(basename $0)" 0
28     ;;
29    
30     stop)
31     rc_print "Stopping USB over TCP/IP Enumerator daemon ..."
32 niro 1534 start-stop-daemon --stop --quiet --pidfile /var/run/usbipd.pid
33 niro 1528 if [[ ! -z $(pidof usbipd) ]]
34     then
35 niro 1534 killall usbipd &> /dev/null
36 niro 1528 fi
37     evaluate_retval
38    
39     update_svcstatus $1
40     splash svc_stopped "$(basename $0)" 0
41     ;;
42    
43     restart)
44     $0 stop
45     sleep 1
46     $0 start
47     ;;
48    
49     status)
50     statusproc /usr/bin/usbipd
51     ;;
52    
53     *)
54     rc_echo "Usage: $0 {start|stop|restart|status}"
55     exit 1
56     ;;
57     esac