2008-06-19 18:27:05 +00:00
|
|
|
@echo off
|
2012-02-10 02:23:11 +00:00
|
|
|
start /min cmd
|
2008-09-21 17:08:49 +00:00
|
|
|
echo Initializing, please wait.
|
2010-06-21 20:43:37 +00:00
|
|
|
FOR /F "tokens=*" %%A IN ('wmic csproduct get uuid /Format:list ^| FIND "="') DO SET %%A
|
2010-06-22 20:50:07 +00:00
|
|
|
echo REGEDIT4 >> duiduuid.reg
|
2010-06-21 20:43:37 +00:00
|
|
|
echo. >> duiduuid.reg
|
|
|
|
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\TCPIP6\Parameters] >> duiduuid.reg
|
2012-03-05 18:33:28 +00:00
|
|
|
echo "Dhcpv6DUID"=hex:00,04,%uuid:~0,2%,%uuid:~2,2%,%uuid:~4,2%,%uuid:~6,2%,%uuid:~9,2%,%uuid:~11,2%,%uuid:~14,2%,%uuid:~16,2%,%uuid:~19,2%,%uuid:~21,2%,%uuid:~24,2%,%uuid:~26,2%,%uuid:~28,2%,%uuid:~30,2%,%uuid:~32,2%,%uuid:~34,2% >> duiduuid.reg
|
2010-06-21 20:43:37 +00:00
|
|
|
echo. >> duiduuid.reg
|
|
|
|
regedit /s duiduuid.reg
|
2013-01-23 19:56:37 +00:00
|
|
|
for /f "delims=" %%a in ('wmic cdrom get drive ^| find ":"') do set optdrive=%%a
|
|
|
|
if not defined optdrive GOTO :netboot
|
|
|
|
set optdrive=%optdrive: =%
|
|
|
|
if not exist %optdrive%\dvdboot.cmd GOTO :netboot
|
|
|
|
call %optdrive%\dvdboot.cmd
|
2013-01-23 14:58:30 +00:00
|
|
|
goto :end
|
|
|
|
:netboot
|
2008-06-19 18:27:05 +00:00
|
|
|
wpeinit
|
2011-09-29 17:19:14 +00:00
|
|
|
for /f %%A IN ('getnextserver.exe') DO SET XCATD=%%A
|
|
|
|
echo Waiting for xCAT server %XCATD% to become reachable (check WinPE network drivers if this does not proceeed)
|
|
|
|
:noping
|
|
|
|
ping -n 1 %XCATD% 2> NUL | find "TTL=" > NUL || goto :noping
|
2008-10-30 18:18:41 +00:00
|
|
|
md \xcat
|
2011-09-29 17:19:14 +00:00
|
|
|
echo Waiting for successful mount of \\%XCATD%\install (if this hangs, check that samba is running)
|
|
|
|
:nomount
|
|
|
|
net use i: \\%XCATD%\install || goto :nomount
|
|
|
|
echo Successfully mounted \\%XCATD%\install, moving on to execute remote script
|
2013-12-03 07:26:31 +00:00
|
|
|
for /f "delims=: tokens=2" %%c in ('ipconfig ^|find "IPv4 Address. . ."') do for /f "tokens=1" %%d in ('echo %%c') do for /f "delims=. tokens=1,2,3,4" %%m in ('echo %%d') do if "%%m.%%n" NEQ "169.254" set NODEIP=%%m.%%n.%%o.%%p
|
2008-06-19 18:27:05 +00:00
|
|
|
for /f %%c in ('echo %NODEIP%') do set NODEIP=%%c
|
2010-06-21 20:43:37 +00:00
|
|
|
if exist i:\autoinst\%NODEIP%.cmd copy i:\autoinst\%NODEIP%.cmd x:\xcat\autoscript.cmd
|
2012-03-05 18:33:28 +00:00
|
|
|
if exist i:\autoinst\%uuid%.cmd copy i:\autoinst\%uuid%.cmd x:\xcat\autoscript.cmd
|
2012-02-10 02:23:11 +00:00
|
|
|
if not exist x:\xcat\autoscript.cmd echo I could not find my autoinst file
|
|
|
|
if not exist x:\xcat\autoscript.cmd pause
|
2008-09-18 18:52:06 +00:00
|
|
|
call x:\xcat\autoscript.cmd
|
2008-06-20 21:28:57 +00:00
|
|
|
wpeutil reboot
|
2013-01-23 14:58:30 +00:00
|
|
|
:end
|