#!/bin/sh # # hotplug This scripts starts hotpluggable subsystems. # . /etc/rc.conf . /etc/rc.d/functions case "$1" in start|restart) stat_busy "Starting Hotplug Daemon" if ! [ "$AUTODETECT" == "1" ]; then for RC in /etc/hotplug/*.rc; do $RC $1; done else /etc/hotplug/pnp.rc $1 /etc/hotplug/input.rc $1 fi add_daemon hotplug touch /var/lock/hotplug stat_done ;; stop) stat_busy "Stopping Hotplug Daemon" if ! [ "$AUTODETECT" == "1" ]; then for RC in /etc/hotplug/*.rc; do $RC $1; done else /etc/hotplug/pnp.rc $1 /etc/hotplug/input.rc $1 fi rm_daemon hotplug rm -f /var/lock/hotplug stat_done ;; *) echo $"Usage: $0 {start|stop|restart}" exit 1 ;; esac exit 0