From f7f908cb8f0a224f63ea96ac32fe69d6c4783b9f Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 21 Jun 2010 20:43:37 +0000 Subject: [PATCH] -Prototype change to WinPE script -Extract UUID, fix endianness, store in %guid% -Change registry to toy with DUID-UUID as defined in draft (number 4 selected for fun of it -Check for cmd by GUID git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6569 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/netboot/windows/startnet.cmd | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/netboot/windows/startnet.cmd b/xCAT-server/share/xcat/netboot/windows/startnet.cmd index 70b48788b..cd53fcf43 100644 --- a/xCAT-server/share/xcat/netboot/windows/startnet.cmd +++ b/xCAT-server/share/xcat/netboot/windows/startnet.cmd @@ -1,5 +1,13 @@ @echo off echo Initializing, please wait. +FOR /F "tokens=*" %%A IN ('wmic csproduct get uuid /Format:list ^| FIND "="') DO SET %%A +set guid=%uuid:~6,2%%uuid:~4,2%%uuid:~2,2%%uuid:~0,2%-%uuid:~11,2%%uuid:~9,2%-%uuid:~16,2%%uuid:~14,2%%uuid:~18,18% +echo Windows Registry Editor Version 5 >> duiduuid.reg +echo. >> duiduuid.reg +echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\TCPIP6\Parameters] >> duiduuid.reg +echo "Dhcpv6DUID"=hex:00,04,%guid:~0,2%,%guid:~2,2%,%guid:~4,2%,%guid:~6,2%,%guid:~9,2%,%guid:~11,2%,%guid:~14,2%,%guid:~16,2%,%guid:~19,2%,%guid:~21,2%,%guid:~24,2%,%guid:~26,2%,%guid:~28,2%,%guid:~30,2%,%guid:~32,2%,%guid:~34,2% >> duiduuid.reg +echo. >> duiduuid.reg +regedit /s duiduuid.reg wpeinit ping -n 60 127.0.0.1 > NUL 2>&1 md \xcat @@ -8,6 +16,7 @@ for /f %%c in ('echo %XCATD%') do set XCATD=%%c net use i: \\%XCATD%\install 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 -copy i:\autoinst\%NODEIP%.cmd x:\xcat\autoscript.cmd +if exist i:\autoinst\%NODEIP%.cmd copy i:\autoinst\%NODEIP%.cmd x:\xcat\autoscript.cmd +if exist i:\autoinst\%guid%.cmd copy i:\autoinst\%guid%.cmd x:\xcat\autoscript.cmd call x:\xcat\autoscript.cmd wpeutil reboot