Annotation of /trunk/usbip/usbipdevd.rc
Parent Directory | Revision Log
Revision 140 -
(hide annotations)
(download)
Tue May 8 08:56:57 2007 UTC (17 years, 5 months ago) by niro
File size: 938 byte(s)
Tue May 8 08:56:57 2007 UTC (17 years, 5 months ago) by niro
File size: 938 byte(s)
-variable config files
1 | niro | 139 | #!/bin/bash |
2 | niro | 140 | # $Header: /root/magellan-cvs/src/usbip/usbipdevd.rc,v 1.2 2007-05-08 08:56:57 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 | 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 | niro | 140 | echo -e ${COLOREDSTAR}"Stopping usbip-device 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 | echo "Usage: $0 {start|stop|restart|status}" | ||
52 | exit 1 | ||
53 | ;; | ||
54 | esac |