#!/bin/sh
#
# hotplug This scripts starts hotpluggable subsystems.
#
# chkconfig: 2345 01 99
# description:	Starts and stops each hotpluggable subsystem. 
#
# $Id: hotplug,v 1.2 2001/02/23 22:05:59 kroah Exp $
#

# source function library
. /etc/rc.d/functions

case "$1" in
    start)
	for RC in /etc/hotplug/*.rc
	do
	    echo -n "Hotplug: starting $RC ..."
	    $RC start &> /dev/null
	    evaluate_retval
	done
	touch /var/lock/subsys/hotplug
	;;
    stop)
	for RC in /etc/hotplug/*.rc
        do
            echo -n "Hotplug: stoping $RC ..."
	    $RC stop &> /dev/null
	    evaluate_retval
        done
        rm -f /var/lock/subsys/hotplug
	;;
   status)
   	for RC in /etc/hotplug/*.rc
	do
	    $RC status
	done
	;;
   restart)
        $0 stop
	sleep 2
	$0 start
        ;;
   reload)
        echo -n "Reloading hotplug ..."
	evaluate_retval
	;;
   *)
        echo $"Usage: $0 {start|stop|restart|status|reload}"
        exit 1
        ;;
esac

