REM @echo off
REM if empty%AGENTWORKS_DIR%==empty goto error_no_environment
REM if NOT EXIST %AGENTWORKS_DIR%\services\bin\ldmib.exe goto no_executable
REM echo starting Services
REM CALL awservices start
REM echo Please wait ...
REM sleepy 20

echo Removing the HP Insight Management Agent MIBs ...

@Echo on

%AGENTWORKS_DIR%\services\bin\ldmib -n cpqApplianceMgmt -m %AGENTWORKS_DIR%\services\config\mibs\cpqApplianceMgmt.txt -r
%AGENTWORKS_DIR%\services\bin\ldmib -n cpqCluster -m %AGENTWORKS_DIR%\services\config\mibs\cpqCluster.txt -r
%AGENTWORKS_DIR%\services\bin\ldmib -n cpqClusteredRAID -m %AGENTWORKS_DIR%\services\config\mibs\cpqClusteredRAID.txt -r
%AGENTWORKS_DIR%\services\bin\ldmib -n cpqDriveArray -m %AGENTWORKS_DIR%\services\config\mibs\cpqDriveArray.txt -r
%AGENTWORKS_DIR%\services\bin\ldmib -n cpqExternalMgmt -m %AGENTWORKS_DIR%\services\config\mibs\cpqExternalMgmt.txt -r
%AGENTWORKS_DIR%\services\bin\ldmib -n cpqFibreArray -m %AGENTWORKS_DIR%\services\config\mibs\cpqFibreArray.txt -r
%AGENTWORKS_DIR%\services\bin\ldmib -n cpqHealth -m %AGENTWORKS_DIR%\services\config\mibs\cpqHealth.txt -r
%AGENTWORKS_DIR%\services\bin\ldmib -n cpqHostOs -m %AGENTWORKS_DIR%\services\config\mibs\cpqHostOs.txt -r
%AGENTWORKS_DIR%\services\bin\ldmib -n cpqIde -m %AGENTWORKS_DIR%\services\config\mibs\cpqIde.txt -r
%AGENTWORKS_DIR%\services\bin\ldmib -n cpqNic -m %AGENTWORKS_DIR%\services\config\mibs\cpqNic.txt -r
%AGENTWORKS_DIR%\services\bin\ldmib -n cpqRackInfo -m %AGENTWORKS_DIR%\services\config\mibs\cpqRackInfo.txt -r
%AGENTWORKS_DIR%\services\bin\ldmib -n cpqRPM -m %AGENTWORKS_DIR%\services\config\mibs\cpqRPM.txt -r
%AGENTWORKS_DIR%\services\bin\ldmib -n cpqScsi -m %AGENTWORKS_DIR%\services\config\mibs\cpqScsi.txt -r
%AGENTWORKS_DIR%\services\bin\ldmib -n cpqSm2 -m %AGENTWORKS_DIR%\services\config\mibs\cpqSm2.txt -r
%AGENTWORKS_DIR%\services\bin\ldmib -n cpqSsStorageSys  -m %AGENTWORKS_DIR%\services\config\mibs\cpqSsStorageSys.txt -r
%AGENTWORKS_DIR%\services\bin\ldmib -n cpqStdEquipment -m %AGENTWORKS_DIR%\services\config\mibs\cpqStdEquipment.txt -r
%AGENTWORKS_DIR%\services\bin\ldmib -n cpqSystemInfo -m %AGENTWORKS_DIR%\services\config\mibs\cpqSystemInfo.txt -r
%AGENTWORKS_DIR%\services\bin\ldmib -n cpqThresholdMgmt -m %AGENTWORKS_DIR%\services\config\mibs\cpqThresholdMgmt.txt -r
%AGENTWORKS_DIR%\services\bin\ldmib -n cpqWinOsMgmt -m %AGENTWORKS_DIR%\services\config\mibs\cpqWinOsMgmt.txt -r
%AGENTWORKS_DIR%\services\bin\ldmib -n cpqLinOsMgmt -m %AGENTWORKS_DIR%\services\config\mibs\cpqLinOsMgmt.txt -r

@Echo off

echo ...
echo Removal of the HP Insight Management Agent MIBs completed.

REM echo stopping Services ...
REM CALL awservices stop
REM echo Please wait ...
REM sleepy 20
REM goto finish_script
REM :error_no_environment
REM echo "Error: Environment variable AGENTWORKS_DIR not defined"
REM goto finish_script
REM :no_executable
REM echo "Error: Could not locate executable file(s) in AGENTWORKS_DIR\services\bin"
REM goto finish_script
REM :wrong_drive
REM echo "Error: Could not find file mib-2.txt"
REM goto finish_script
REM :finish_script
