#!/bin/bash
#
# chkconfig: 345 04 95
# description: imbrem is used to remove ipmidrvr rpm from the system 
#

case "$1" in 
"start")
        if [ -f /etc/rc.d/init.d/ismrem ]
        then
            /etc/rc.d/init.d/ismrem start
        fi
	rpm -e ipmidrvr
        /sbin/chkconfig --del imbrem
        if [ -f /etc/rc.d/init.d/imbrem ]
        then
            rm -f /etc/rc.d/init.d/imbrem
        fi
        ;;
"stop")
        if [ -f /etc/rc.d/init.d/ismrem ]
        then
            /etc/rc.d/init.d/ismrem stop
        fi
	rpm -e ipmidrvr
        /sbin/chkconfig --del imbrem
        if [ -f /etc/rc.d/init.d/imbrem ]
        then
            rm -f /etc/rc.d/init.d/imbrem
        fi
        ;;
    *)
        echo imbrem:Unknown Argument $arg
        echo Usage:imbrem [start/stop]
        exit 1
        ;;
esac
