#!/bin/ksh
#
# $Header$

[[ $DEVCLASS != 2 ]] && exit 0
label=$(disklabel $DEVNAME 2>&1 | sed -n '/^label: /s/^label: //p')
case $label in
iSCSI*)
	duid=$(disklabel $DEVNAME 2>&1 | sed -n '/^duid: /s/^duid: //p')
	sleep 5
	set -A parts $(cat /etc/fstab | sed -n "/^$duid/s/ .*//;s/^$duid.//p")
	for part in ${parts[@]} ; do
 		fsck -y /dev/"$DEVNAME"$part
		mount $duid.$part
	done
esac
