#!/bin/bash
. /etc/profile.d/SetNNEnvVar.sh

/etc/rc.d/init.d/script.template $1 BcmAmp

case "$1" in
  start)
        #######################################################################
        # This script changes the Home page image according to the type of BCM
        #######################################################################
        BCM_TYPE=`pdrcmd get "Nortel Networks\platform services\product version"`
        if [ $BCM_TYPE = "BCM1000" ]; then
                cp /srv/www/main/images/Bcm1000.JPG /srv/www/main/images/BcmDevice.JPG
        elif [ $BCM_TYPE = "BCM400" ]; then
                cp /srv/www/main/images/Bcm400.JPG /srv/www/main/images/BcmDevice.JPG
        else
                cp /srv/www/main/images/Bcm200.JPG /srv/www/main/images/BcmDevice.JPG
        fi

        ;;
  stop)
        rm -f /srv/www/main/images/BcmDevice.JPG
        ;;
esac

exit $?
