@echo off
REM #     cfgdisk-scsi.cmd  - script to configure SCSI disks
REM #
set sdir=x:\deploy\win32
set logfile=%DeploymentStore%\cfgdisks.log
set wce=0
set ADDLOG=call addLogRecord
REM set ADDLOG=echo
set RET=0

REM cd %sdir%
echo cfgdisk >%logfile%
REM # configure the disks to turn off write cache
echo slist -a -w%wce% >>%logfile% 
slist -a -w%wce% >>%logfile% 2>&1
if errorlevel 1 goto cfgderror
 %ADDLOG% CFGDISK INFO "Success: Disk config saved"
 goto cfgddone
:cfgderror
 set RET=%ERRORLEVEL%
 %ADDLOG% CFGDISK ERROR "Error %ERRORLEVEL%: Disk config error"
:cfgddone

echo cfgdisk-scsi(wce=%wce%) done, ret=%RET%
exit /B %RET%
