15 |
|
|
16 |
case "$1" in |
case "$1" in |
17 |
start) |
start) |
18 |
|
if [[ -z $(grep '^usbip[-_]host' /proc/modules) ]] |
19 |
|
then |
20 |
|
modprobe usbip-host &> /dev/null |
21 |
|
fi |
22 |
rc_print "Starting USB over TCP/IP Enumerator daemon ..." |
rc_print "Starting USB over TCP/IP Enumerator daemon ..." |
23 |
start-stop-daemon --start --exec /usr/bin/usbipd --pidfile /var/run/usbipd.pid --make-pidfile -- -D |
start-stop-daemon --start --quiet --exec /usr/bin/usbipd --pidfile /var/run/usbipd.pid --make-pidfile -- -D |
24 |
evaluate_retval |
evaluate_retval |
25 |
|
|
26 |
update_svcstatus $1 |
update_svcstatus $1 |
29 |
|
|
30 |
stop) |
stop) |
31 |
rc_print "Stopping USB over TCP/IP Enumerator daemon ..." |
rc_print "Stopping USB over TCP/IP Enumerator daemon ..." |
32 |
start-stop-daemon --stop --pidfile /var/run/usbipd.pid |
start-stop-daemon --stop --quiet --pidfile /var/run/usbipd.pid |
33 |
if [[ ! -z $(pidof usbipd) ]] |
if [[ ! -z $(pidof usbipd) ]] |
34 |
then |
then |
35 |
killall usbipd |
killall usbipd &> /dev/null |
36 |
fi |
fi |
37 |
evaluate_retval |
evaluate_retval |
38 |
|
|