File: //usr/local/MegaRAID Storage Manager/starthelp.sh
#!/bin/sh
. /etc/init.d/msm_profile
if [ "$2" == "" ]; then
DOCLANG=`echo $LANG`
echo $DOCLANG
EXTDIR=`echo $DOCLANG | awk '{print substr($1,1,2)}'`
if [ "$EXTDIR" = "zh" ]; then
EXTDIR=`echo $DOCLANG | awk '{print substr($1,1,5)}'`
EXTDIR=`echo $EXTDIR | sed 's/_/-/g'`
fi
if [ -d "$MSM_HOME/docs/$EXTDIR" ]; then
DOCDIR="$MSM_HOME/docs/$EXTDIR"
else
DOCDIR="$MSM_HOME/docs"
fi
PARAM="msmHELP.htm"
else
DOCDIR="$MSM_HOME/$1"
PARAM="$2"
fi
CHECK=`which mozilla`
if [ "${CHECK}" = "" ]; then
echo "mozilla not present"
else
mozilla "file:///$DOCDIR/$PARAM"
exit
fi
CHECK=`which firefox`
if [ "${CHECK}" = "" ]; then
echo "firefox not present"
else
firefox "$(echo file:///$DOCDIR/$PARAM|sed 's/ /%20/g')"
exit
fi
echo "Support Browser are not installed on this system. Please install mozilla/firefox to launch help"