#!/bin/bash # $Header: /root/magellan-cvs/src/usbip/usbipdevd.rc,v 1.1 2007-05-08 07:28:12 niro Exp $ #%rlevels: 3:s 4:s 5:s 0:k 1:k 2:k 6:k #%start: 90 #%stop: 20 #deps #%needs: #%before: #%after: source /etc/sysconfig/rc source $rc_functions exec=/root/usbipdevd case "$1" in start) echo -e ${COLOREDSTAR}"Starting usbip-device daemon ..." start-stop-daemon --quiet --start --exec ${exec} \ --pidfile /var/run/usbipdevd.pid \ --make-pidfile --background evaluate_retval update_svcstatus $1 splash svc_started "$(basename $0)" 0 ;; stop) echo -e ${COLOREDSTAR}"Stopping Network USB daemon ..." start-stop-daemon --quiet --stop \ --pidfile /var/run/usbipdevd.pid evaluate_retval update_svcstatus $1 splash svc_stopped "$(basename $0)" 0 ;; restart) $0 stop sleep 1 $0 start ;; status) statusproc ${exec} ;; *) echo "Usage: $0 {start|stop|restart|status}" exit 1 ;; esac