2d42ffe517
some vendors disagreed with MS on encoding. SMBIOS 2.6 mandates the MS way In startnet.cmd, assume wmic is accurate instead of 'fixing it'. This means DUID changes, but I don't think anyone cares and this paves the way for a reasonable DUID future. For autoinst cmd script, it is a problem. Have windows.pm provide two UUID based links, one with the correct presentation and a byte-swapped variant git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11750 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
29 lines
1.5 KiB
Batchfile
29 lines
1.5 KiB
Batchfile
@echo off
|
|
start /min cmd
|
|
echo Initializing, please wait.
|
|
FOR /F "tokens=*" %%A IN ('wmic csproduct get uuid /Format:list ^| FIND "="') DO SET %%A
|
|
echo REGEDIT4 >> duiduuid.reg
|
|
echo. >> duiduuid.reg
|
|
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\TCPIP6\Parameters] >> duiduuid.reg
|
|
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
|
|
echo. >> duiduuid.reg
|
|
regedit /s duiduuid.reg
|
|
wpeinit
|
|
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
|
|
md \xcat
|
|
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
|
|
for /f "delims=: tokens=2" %%c in ('ipconfig ^|find "IPv4 Address. . ."') do set NODEIP=%%c
|
|
for /f %%c in ('echo %NODEIP%') do set NODEIP=%%c
|
|
if exist i:\autoinst\%NODEIP%.cmd copy i:\autoinst\%NODEIP%.cmd x:\xcat\autoscript.cmd
|
|
if exist i:\autoinst\%uuid%.cmd copy i:\autoinst\%uuid%.cmd x:\xcat\autoscript.cmd
|
|
if not exist x:\xcat\autoscript.cmd echo I could not find my autoinst file
|
|
if not exist x:\xcat\autoscript.cmd pause
|
|
call x:\xcat\autoscript.cmd
|
|
wpeutil reboot
|