#! /bin/sh
#
# ###################################################################
# Copyright (c) 2000, EMC Corporation. All Rights Reserved.
#
# Most Recent Author: Ajith Balakrishnan
# Previous Authors:
#
# Contents:
# This scripts configures iSCSI devices for EMC PowerPath.
# ###################################################################
#

# CONFIG_DELAY=0
case $1 in
	start)
		if [ -f /etc/init.d/iscsi ]; then
            # echo "Delaying PowerPath device configuartion for $CONFIG_DELAY seconds..."
            # sleep $CONFIG_DELAY
            echo "Configuring iSCSI devices for PowerPath...."
    		/sbin/powermt config >/dev/null 2>&1
    		/sbin/powermt load >/dev/null 2>&1
    		/etc/opt/emcpower/emcpmgr map >/dev/null 2>&1
    		mount -a >/dev/null 2>&1
		fi
    	/sbin/powermt save >/dev/null 2>&1
		err=$?
		;;
	stop)
		exit 0
		;;
	*)
		echo "Usage: $0 {start|stop}"
       	exit 1
        ;;
esac
exit $err



