Magellan Linux

Contents of /trunk/usbip/usbipdevd.rc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 139 - (show annotations) (download)
Tue May 8 07:28:12 2007 UTC (16 years, 11 months ago) by niro
File size: 937 byte(s)
-import of development scripts

1 #!/bin/bash
2 # $Header: /root/magellan-cvs/src/usbip/usbipdevd.rc,v 1.1 2007-05-08 07:28:12 niro Exp $
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/sysconfig/rc
14 source $rc_functions
15
16 exec=/root/usbipdevd
17
18 case "$1" in
19 start)
20 echo -e ${COLOREDSTAR}"Starting usbip-device daemon ..."
21 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 echo -e ${COLOREDSTAR}"Stopping Network USB daemon ..."
32 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 echo "Usage: $0 {start|stop|restart|status}"
52 exit 1
53 ;;
54 esac