#!/sbin/sh
########
#  Product: Firefox
#  Fileset: FFOX-COM
#  configure
########
#
# (c) Copyright 2007 Hewlett-Packard Development Company, L.P.
#
########

typeset -i exitval

UTILS="/usr/lbin/sw/control_utils"
if [[ ! -f $UTILS ]]; then
   echo "ERROR: Cannot find $UTILS"
   exit 1
   fi
. $UTILS
exitval=$SUCCESS


#################################################################
#
# Update /etc/PATH to include /opt/firefox ahead of /opt/mozilla
#

if grep -q /opt/mozilla /etc/PATH ; then
   mod_pathfile -i P /opt/firefox /opt/mozilla
   exitval=$?
else
   mod_pathfile -a P /opt/firefox
   exitval=$?
fi

if [ $exitval -ne $SUCCESS -a $exitval -ne $WARNING ] ; then
   echo "WARNING: Could not add /opt/firefox to /etc/PATH."
   exitval=$WARNING
else
   exitval=$SUCCESS
fi

exit $exitval
