#!/bin/sh # # chkconfig: 2345 01 99 # description: Starts and stops each hotpluggable subsystem. # On startup, may simulate hotplug events for devices # that were present at boot time, before filesystems # used by /sbin/hotplug became available. # # $Id: hotplug.init,v 1.3 2002/01/17 12:39:01 ukai Exp $ # case "$1" in start) echo -n "Starting hotplug subsystem:" for RC in /etc/hotplug/*.rc do basename=${RC#/etc/hotplug/} name=${basename%.rc} echo -n " $name" $RC $1 done echo "." # touch /var/lock/subsys/hotplug ;; stop) echo -n "Stopping hotplug subsystem:" for RC in /etc/hotplug/*.rc do basename=${RC#/etc/hotplug/} name=${basename%.rc} echo -n " $name" $RC stop done echo "." # rm -f /var/lock/subsys/hotplug ;; force-reload|restart) echo -n "Restarting hotplug subsystem:" for RC in /etc/hotplug/*.rc do basename=${RC#/etc/hotplug/} name=${basename%.rc} echo -n " $name" $RC restart done echo "." ;; status) for RC in /etc/hotplug/*.rc do $RC $1 done ;; help|*) echo "Usage: $0 [help|start|stop|restart|status|force-reload]" exit 1 ;; esac exit 0