#!/bin/bash # # hw-detect This scripts runs a modified knoppix hardware probe. # # chkconfig: 345 05 95 # description: This runs the hardware probe, and configures the hardware. case "$1" in start) echo -n $"Checking for new hardware" # We don't want to run this on random runlevel changes. touch /var/lock/subsys/hw-detect /opt/knoppix/knoppix-autoconfig ;; status) base=hw-detect if [ -f /var/lock/subsys/hw-detect ]; then echo $"${base} has run" exit 0 fi echo $"${base} is stopped" exit 3 ;; stop) rm -f /var/lock/subsys/hw-detect ;; *) echo $"Usage: $0 {start|stop}" exit 1 ;; esac exit $RETVAL