File: //usr/local/MegaRAID Storage Manager/pwd.sh
echo "#!/bin/sh" > /etc/init.d/msm_profile
echo "#" >> /etc/init.d/msm_profile
echo "# msm_profile sets the environment variables" >> /etc/init.d/msm_profile
echo "# chkconfig: 2345 99 00" >> /etc/init.d/msm_profile
echo "# processname: msm_profile" >> /etc/init.d/msm_profile
echo "### BEGIN INIT INFO" >> /etc/init.d/msm_profile
echo "# Provides: msm_profile" >> /etc/init.d/msm_profile
echo "# Required-Start: $syslog" >> /etc/init.d/msm_profile
echo "# Required-Stop:" >> /etc/init.d/msm_profile
echo "# Default-Start: 2 3 4 5" >> /etc/init.d/msm_profile
echo "# Default-Stop: 0 6" >> /etc/init.d/msm_profile
echo "# Description: msm_profile" >> /etc/init.d/msm_profile
echo "### END INIT INFO" >> /etc/init.d/msm_profile
echo "MSM_HOME=\""`echo $0 | sed -e 's/\/pwd.sh//'`"\"">> /etc/init.d/msm_profile
echo "export MSM_HOME" >> /etc/init.d/msm_profile
\rm -f $0