#!/bin/sh
#
# hotplug This scripts starts hotpluggable subsystems.
#
# 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,v 1.2 2001/06/14 14:13:20 jamey Exp $
#

# source function library
if [ -f /etc/init.d/functions ]; then
	. /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ]; then
	. /etc/rc.d/init.d/functions
fi

case "$1" in
    start|restart|status)
	for RC in /etc/hotplug/*.rc
	do
	    $RC $1
	done
	mkdir -p /var/lock/subsys
	touch /var/lock/subsys/hotplug
	;;
    stop)
	for RC in /etc/hotplug/*.rc
        do
            $RC stop
        done
        rm -f /var/lock/subsys/hotplug
        ;;

    *)
    echo $"Usage: $0 {start|stop|restart|status}"
    exit 1
    ;;
esac
