opt/coldplug/coldplug.rc
2006-02-23 15:26:10 +00:00

33 lines
517 B
Bash

#!/bin/sh
#
# /etc/rc.d/coldplug: load modules at boot-time for non-hotplugged devices
#
case $1 in
start)
# Notify the user if hotplug support is missing from their kernel.
if [ ! -f /proc/sys/kernel/hotplug ]
then
echo "CONFIG_HOTPLUG (hotplug support) is missing from your kernel!"
exit 1
fi
# Check for hotplug package
if [ ! -d /etc/hotplug ]
then
echo "Coldplug requires hotplug!"
exit 1
fi
# Do the deed
for i in /etc/hotplug/*.rc
do
$i start
done
;;
stop)
;;
restart)
;;
*)
;;
esac