# $PATH should be in the beginning so that fabos/bin is defined
# before /bin, so that passwd command in /fabos/bin 
# is selected since it is wrapper for /bin/passwd which also saves passwd
# changes in flash
PATH="/fabos/link_bin:/bin:/usr/bin:/sbin:/usr/sbin:/fabos/link_abin:/fabos/link_sbin:/fabos/link_rbin:/fabos/factory:/fabos/xtool"


fabos_version=v`rpm -q fabos`
if [ -d /nfabos/bin ]; then
  if echo $fabos_version | grep "MFG" >/dev/null; then
     PATH="/nfabos/bin:"$PATH
  else
     PATH=$PATH":/nfabos/bin"
  fi
fi

HISTSIZE=500

alias ls='ls -CAF'
export PATH

# 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

# The following is added to check for default password for root login
if [ "$standby" == "" ]; then

	standby=0
	haShow | grep Local | grep Standby > /dev/null 2>&1
	if [ $? -eq 0 ]; then
		standby=1
	fi
fi

if [ $standby -eq 0 ]; then
	/fabos/bin/chkdefaultpasswds
	ret=$?
	if [ $ret -eq 2 ]; then
		exit 2
	fi
	/fabos/bin/passwdhashchange
	stat=$?
	if [ $stat -eq 1 ]; then
		exit 1
	fi
fi

# fix for defect 78391
alias reboot=/fabos/link_sbin/reboot
