#!/bin/bash #%rlevels: 0:k 1:k 6:k 7:s #%start: 56 #%stop: 55 #deps #%needs: #%before: #%after: source /etc/sysconfig/rc source $rc_functions case $1 in start) if [ ! -d /etc/hotplug ] then echo "Please install sys-apps/hotplug" exit 1 fi for i in /etc/hotplug/*.rc do echo -e ${COLOREDSTAR}"Starting hotplug for $(basename ${i} .rc) devices" ${i} start evaluate_retval done update_svcstatus $1 splash svc_started "$(basename $0)" 0 ;; stop) for i in /etc/hotplug/*.rc do echo -e ${COLOREDSTAR}"Stopping hotplug for $(basename ${i} .rc) devices" ${i} stop evaluate_retval done update_svcstatus $1 splash svc_stopped "$(basename $0)" 0 ;; restart) $0 stop sleep 1 $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac