Magellan Linux

Annotation of /trunk/usbip/usbipdevd.rc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1531 - (hide annotations) (download)
Mon Sep 19 16:02:35 2011 UTC (13 years, 1 month ago) by niro
File size: 930 byte(s)
-fixed rc conf.d path
-use rc_print() and rc_echo()
-better name for the daemon
1 niro 139 #!/bin/bash
2 niro 176 # $Header: /root/magellan-cvs/src/usbip/usbipdevd.rc,v 1.3 2007-05-09 15:06:06 niro Exp $
3 niro 139
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 niro 1531 source /etc/conf.d/rc
14 niro 139 source $rc_functions
15    
16 niro 176 exec=/usr/sbin/usbipdevd
17 niro 139
18     case "$1" in
19     start)
20 niro 1531 rc_print "Starting USBIP Device-Export daemon ..."
21 niro 139 start-stop-daemon --quiet --start --exec ${exec} \
22     --pidfile /var/run/usbipdevd.pid \
23     --make-pidfile --background
24     evaluate_retval
25    
26     update_svcstatus $1
27     splash svc_started "$(basename $0)" 0
28     ;;
29    
30     stop)
31 niro 1531 rc_print "Stopping USBIP Device-Export daemon ..."
32 niro 139 start-stop-daemon --quiet --stop \
33     --pidfile /var/run/usbipdevd.pid
34     evaluate_retval
35    
36     update_svcstatus $1
37     splash svc_stopped "$(basename $0)" 0
38     ;;
39    
40     restart)
41     $0 stop
42     sleep 1
43     $0 start
44     ;;
45    
46     status)
47     statusproc ${exec}
48     ;;
49    
50     *)
51 niro 1531 rc_echo "Usage: $0 {start|stop|restart|status}"
52 niro 139 exit 1
53     ;;
54     esac