#    Copyright (c) 1996-2001 Brocade Communications Systems, Inc.
#    All rights reserved.
#
#    profile for the user user of Fabric OS services and interfaces
#
# set the PATH variable
PATH="/fabos/link_abin:/fabos/link_sbin:/fabos/link_bin"

# Set the control-C handler back to default
# This trap was turned off in /etc/profile.
# Note that this trap statement should be BEFORE chkdefaultpasswds
# otherwise control-C cannot be used to quit changing default passwords.
trap - INT

if [ $setup_standby_profile -eq 0 ]; then
	if [ $LOGIN_ID == "user" ]; then
		# check default password only for local switch acct
		if [[ $AUTH_TYPE -eq 0 ]]; then	
			/fabos/bin/chkdefaultpasswds
			ret=$?
			if [ $ret -eq 2 ]; then
				exit 2
			fi
		fi
	fi
	
	/fabos/bin/passwdhashchange
	stat=$?
	if [ $stat -eq 1 ]; then
		exit 1
	fi
fi

# we will disable hashing as it will defeat our PATH settings
# by hashing the original symbolic link values to the
# obsolute paths.
shopt -s checkhash > /dev/null
