# -*- mode: shell-script;-*-
# vim:syntax=sh
# $Id: functions 1265 2005-09-01 08:09:05Z zoz $
#
# /etc/sysconfig/hardware/scripts/functions
#
# Common functions for hwup and hotplug related scripts
#

PATH=/sbin:/bin
HOTPLUG_BIN=/sbin/udevsend

. /etc/sysconfig/hardware/config
. /etc/sysconfig/network/scripts/functions.common

if [ -r /etc/sysconfig/hotplug ] ; then
	. /etc/sysconfig/hotplug
fi

# Get the mount point for sysfs
if [ -f /proc/mounts ]; then
	while read MNTPT MNTDIR MNTSYS MNTTYPE; do
		if test "$MNTSYS" = "sysfs"; then
			SYSFS="$MNTDIR"
			break;
		fi 
	done </proc/mounts
fi
if [ "$SYSFS" = needed ] ; then
	err_mesg "Sysfs not mounted, cannot execute"
	exit 1
fi

