Author: arkurth
Date: Mon Apr 27 16:37:23 2009
New Revision: 769054
URL: http://svn.apache.org/viewvc?rev=769054&view=rev
Log:
VCL-23
Reworked Windows scripts. These scripts are only used by the modularized
Windows_mod.pm code. Added ASF headers. Removed Windows root password from
script files. The Perl code now searches for and replaces the
WINDOWS_ROOT_PASSWORD string in the files when it copies them to a node.
Renamed vcl_* files to make the names more generic.
Added:
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/add_post_load_run_key.cmd
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/debug_info.cmd
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/delete_post_load_run_key.cmd
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/post_load.cmd
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/sysprep_cmdlines.cmd
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/system_startup.cmd
Removed:
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/cmdlines.cmd
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/query_registry.cmd
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/remove_first_boot_key.cmd
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/vcl_first_boot.cmd
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/vcl_startup.cmd
Modified:
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/autologon_disable.cmd
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/autologon_enable.cmd
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/configure_networking.vbs
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/set_computer_name.vbs
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/update_cygwin.cmd
incubator/vcl/trunk/managementnode/tools/Windows/Utilities/Sysprep/i386/$oem$/cmdlines.txt
Added:
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/add_post_load_run_key.cmd
URL:
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/tools/Windows/Scripts/add_post_load_run_key.cmd?rev=769054&view=auto
==============================================================================
---
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/add_post_load_run_key.cmd
(added)
+++
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/add_post_load_run_key.cmd
Mon Apr 27 16:37:23 2009
@@ -0,0 +1,52 @@
+...@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+rem DESCRIPTION:
+rem This script is called during the Sysprep minisetup stage and adds a
+rem registry entry to HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run.
+rem The added key causes post_load.cmd to be executed automatically when
+rem the root account automatically logs in after Windows boots for the
+rem first time.
+
+set /A STATUS=0
+
+rem Get the name of this batch file and the directory it is running from
+set SCRIPT_NAME=%~n0
+set SCRIPT_FILENAME=%~nx0
+set SCRIPT_DIR=%~dp0
+rem Remove trailing slash from SCRIPT_DIR
+set SCRIPT_DIR=%SCRIPT_DIR:~0,-1%
+
+echo ======================================================================
+echo %SCRIPT_FILENAME% beginning to run at: %DATE% %TIME%
+echo Directory %SCRIPT_FILENAME% is running from: %SCRIPT_DIR%
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo Adding registry HKLM-Run command to run post_load.cmd...
+"%SystemRoot%\system32\reg.exe" ADD
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /t REG_SZ /v
"post_load.cmd" /d "%SCRIPT_DIR%\post_load.cmd >>
%SCRIPT_DIR%\..\Logs\post_load.log" /f
+echo ERRORLEVEL: %ERRORLEVEL%
+set /A STATUS+=%ERRORLEVEL%
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo %SCRIPT_FILENAME% finished at: %DATE% %TIME%
+echo exiting with status: %STATUS%
+"%SystemRoot%\system32\eventcreate.exe" /T INFORMATION /L APPLICATION /SO
%SCRIPT_FILENAME% /ID 555 /D "exit status: %STATUS%" 2>&1
+
+exit /B %STATUS%
Modified:
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/autologon_disable.cmd
URL:
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/tools/Windows/Scripts/autologon_disable.cmd?rev=769054&r1=769053&r2=769054&view=diff
==============================================================================
---
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/autologon_disable.cmd
(original)
+++
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/autologon_disable.cmd
Mon Apr 27 16:37:23 2009
@@ -14,17 +14,27 @@
rem See the License for the specific language governing permissions and
rem limitations under the License.
-rem This script reconfigures the Cygwin sshd service.
-rem It regenerates the computer's host keys. This is necessary
-rem when Sysprep is run and a new SID is generated.
-rem This script MUST be run by the root account or else the
-rem sshd service will not start.
+rem DESCRIPTION:
+rem This script disables AutoAdminLogon and clears the password from the
+rem registry so that the root account doesn't automatically log in more
+rem than once. It is called by post_load.cmd.
+
set /A STATUS=0
+rem Get the name of this batch file and the directory it is running from
+set SCRIPT_NAME=%~n0
+set SCRIPT_FILENAME=%~nx0
+set SCRIPT_DIR=%~dp0
+rem Remove trailing slash from SCRIPT_DIR
+set SCRIPT_DIR=%SCRIPT_DIR:~0,-1%
+
echo ======================================================================
-echo %~nx0 beginning to run at: %DATE% %TIME%
+echo %SCRIPT_FILENAME% beginning to run at: %DATE% %TIME%
+echo Directory %SCRIPT_FILENAME% is running from: %SCRIPT_DIR%
echo.
+echo ----------------------------------------------------------------------
+
echo Setting AutoAdminLogon to 0...
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon" /v "AutoAdminLogon" /t REG_SZ /d "0" /f
echo ERRORLEVEL: %ERRORLEVEL%
@@ -37,6 +47,10 @@
set /A STATUS+=%ERRORLEVEL%
echo.
-echo %~nx0 finished at: %DATE% %TIME%
+echo ----------------------------------------------------------------------
+
+echo %SCRIPT_FILENAME% finished at: %DATE% %TIME%
echo exiting with status: %STATUS%
-exit /B %STATUS%
\ No newline at end of file
+"%SystemRoot%\system32\eventcreate.exe" /T INFORMATION /L APPLICATION /SO
%SCRIPT_FILENAME% /ID 555 /D "exit status: %STATUS%" 2>&1
+
+exit /B %STATUS%
Modified:
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/autologon_enable.cmd
URL:
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/tools/Windows/Scripts/autologon_enable.cmd?rev=769054&r1=769053&r2=769054&view=diff
==============================================================================
---
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/autologon_enable.cmd
(original)
+++
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/autologon_enable.cmd
Mon Apr 27 16:37:23 2009
@@ -14,19 +14,31 @@
rem See the License for the specific language governing permissions and
rem limitations under the License.
-rem This script reconfigures the Cygwin sshd service.
-rem It regenerates the computer's host keys. This is necessary
-rem when Sysprep is run and a new SID is generated.
-rem This script MUST be run by the root account or else the
-rem sshd service will not start.
+rem DESCRIPTION:
+rem This script enables AutoAdminLogon for the root account. It causes root
+rem to automatically log in after Windows boots for the first time after
+rem an image has been loaded. It is called by sysprep_cmdlines.cmd. It
+rem must be called during this stage because Sysprep will disable
+rem AutoAdminLogon if it has been configured previously.
+
set /A STATUS=0
+rem Get the name of this batch file and the directory it is running from
+set SCRIPT_NAME=%~n0
+set SCRIPT_FILENAME=%~nx0
+set SCRIPT_DIR=%~dp0
+rem Remove trailing slash from SCRIPT_DIR
+set SCRIPT_DIR=%SCRIPT_DIR:~0,-1%
+
echo ======================================================================
-echo %~nx0 beginning to run at: %DATE% %TIME%
+echo %SCRIPT_FILENAME% beginning to run at: %DATE% %TIME%
+echo Directory %SCRIPT_FILENAME% is running from: %SCRIPT_DIR%
echo.
+echo ----------------------------------------------------------------------
+
set USERNAME=root
-set PASSWORD=cl0udy
+set PASSWORD=WINDOWS_ROOT_PASSWORD
echo Setting AutoAdminLogon to 1...
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon" /v "AutoAdminLogon" /t REG_SZ /d "1" /f
@@ -46,6 +58,10 @@
set /A STATUS+=%ERRORLEVEL%
echo.
-echo %~nx0 finished at: %DATE% %TIME%
+echo ----------------------------------------------------------------------
+
+echo %SCRIPT_FILENAME% finished at: %DATE% %TIME%
echo exiting with status: %STATUS%
-exit /B %STATUS%
\ No newline at end of file
+"%SystemRoot%\system32\eventcreate.exe" /T INFORMATION /L APPLICATION /SO
%SCRIPT_FILENAME% /ID 555 /D "exit status: %STATUS%" 2>&1
+
+exit /B %STATUS%
Modified:
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/configure_networking.vbs
URL:
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/tools/Windows/Scripts/configure_networking.vbs?rev=769054&r1=769053&r2=769054&view=diff
==============================================================================
---
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/configure_networking.vbs
(original)
+++
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/configure_networking.vbs
Mon Apr 27 16:37:23 2009
@@ -12,6 +12,9 @@
' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
' See the License for the specific language governing permissions and
' limitations under the License.
+
+Set objShell = CreateObject("WScript.Shell")
+
WScript.Echo (WScript.ScriptName & " beginning to run: " & Date & " " & Time)
strSystem32="%SystemRoot%\system32"
@@ -37,8 +40,8 @@
CMD_IPCONFIG_RELEASE=strSystem32 & "\ipconfig.exe /release"
CMD_IPCONFIG_RENEW=strSystem32 & "\ipconfig.exe /renew"
-RunCommand CMD_IPCONFIG_RELEASE, "Releasing DHCP lease"
-RunCommand CMD_IPCONFIG_RENEW, "Renewing DHCP lease"
+'RunCommand CMD_IPCONFIG_RELEASE, "Releasing DHCP lease"
+'RunCommand CMD_IPCONFIG_RENEW, "Renewing DHCP lease"
RunCommand CMD_IPCONFIG_ALL, "Running ipconfig /all"
@@ -62,7 +65,7 @@
WScript.Echo
' Check if all the required information was found
-If (Len(PRIVATE_NAME) > 0) And (Len(PRIVATE_IP) > 0) And (Len(PRIVATE_GATEWAY)
> 0) _
+If (Len(PRIVATE_NAME) > 0) And (Len(PRIVATE_IP) > 0) _
And (Len(PUBLIC_NAME) > 0) And (Len(PUBLIC_IP) > 0) And
(Len(PUBLIC_GATEWAY) > 0) _
Then
WScript.Echo "Successfully retrieved private and public network
configuration"
@@ -71,31 +74,31 @@
WScript.Quit 1
End If
-' Set system environment variables
-Set objShell = CreateObject("WScript.Shell")
-Set sysvars = objShell.Environment("SYSTEM")
-sysvars("VCL_PRIVATE_NAME") = PRIVATE_NAME
-sysvars("VCL_PRIVATE_IP") = PRIVATE_IP
-sysvars("VCL_PRIVATE_MASK") = PRIVATE_SUBNET_MASK
-sysvars("VCL_PRIVATE_GATEWAY") = PRIVATE_GATEWAY
-sysvars("VCL_PUBLIC_NAME") = PUBLIC_NAME
-sysvars("VCL_PUBLIC_IP") = PUBLIC_IP
-sysvars("VCL_PUBLIC_MASK") = PUBLIC_SUBNET_MASK
-sysvars("VCL_PUBLIC_GATEWAY") = PUBLIC_GATEWAY
-
-WScript.Echo
-
-WScript.Echo "Set environment variables:"
-Set sysvars = objShell.Environment("SYSTEM")
-WScript.Echo "VCL_PRIVATE_NAME: " & sysvars("VCL_PRIVATE_NAME")
-WScript.Echo "VCL_PRIVATE_IP: " & sysvars("VCL_PRIVATE_IP")
-WScript.Echo "VCL_PRIVATE_MASK: " & sysvars("VCL_PRIVATE_MASK")
-WScript.Echo "VCL_PRIVATE_GATEWAY: " & sysvars("VCL_PRIVATE_GATEWAY")
-WScript.Echo
-WScript.Echo "VCL_PUBLIC_NAME: " & sysvars("VCL_PUBLIC_NAME")
-WScript.Echo "VCL_PUBLIC_IP: " & sysvars("VCL_PUBLIC_IP")
-WScript.Echo "VCL_PUBLIC_MASK: " & sysvars("VCL_PUBLIC_MASK")
-WScript.Echo "VCL_PUBLIC_GATEWAY: " & sysvars("VCL_PUBLIC_GATEWAY")
+'' Set system environment variables
+'Set objShell = CreateObject("WScript.Shell")
+'Set sysvars = objShell.Environment("SYSTEM")
+'sysvars("VCL_PRIVATE_NAME") = PRIVATE_NAME
+'sysvars("VCL_PRIVATE_IP") = PRIVATE_IP
+'sysvars("VCL_PRIVATE_MASK") = PRIVATE_SUBNET_MASK
+'sysvars("VCL_PRIVATE_GATEWAY") = PRIVATE_GATEWAY
+'sysvars("VCL_PUBLIC_NAME") = PUBLIC_NAME
+'sysvars("VCL_PUBLIC_IP") = PUBLIC_IP
+'sysvars("VCL_PUBLIC_MASK") = PUBLIC_SUBNET_MASK
+'sysvars("VCL_PUBLIC_GATEWAY") = PUBLIC_GATEWAY
+'
+'WScript.Echo
+'
+'WScript.Echo "Set environment variables:"
+'Set sysvars = objShell.Environment("SYSTEM")
+'WScript.Echo "VCL_PRIVATE_NAME: " & sysvars("VCL_PRIVATE_NAME")
+'WScript.Echo "VCL_PRIVATE_IP: " & sysvars("VCL_PRIVATE_IP")
+'WScript.Echo "VCL_PRIVATE_MASK: " & sysvars("VCL_PRIVATE_MASK")
+'WScript.Echo "VCL_PRIVATE_GATEWAY: " & sysvars("VCL_PRIVATE_GATEWAY")
+'WScript.Echo
+'WScript.Echo "VCL_PUBLIC_NAME: " & sysvars("VCL_PUBLIC_NAME")
+'WScript.Echo "VCL_PUBLIC_IP: " & sysvars("VCL_PUBLIC_IP")
+'WScript.Echo "VCL_PUBLIC_MASK: " & sysvars("VCL_PUBLIC_MASK")
+'WScript.Echo "VCL_PUBLIC_GATEWAY: " & sysvars("VCL_PUBLIC_GATEWAY")
'----------------------------------------------------------------------------
' Assemble the external commands
@@ -180,38 +183,37 @@
intExitStatusTotal = intExitStatusTotal + RunCommand(CMD_SET_PUBLIC_DNS,
"Setting the public adapter to not register DNS records")
intExitStatusTotal = intExitStatusTotal + RunCommand(CMD_SET_PRIVATE_DNS,
"Setting the private adapter to not register DNS records")
-' Set the private adapter to static and remove the default gateway
-intExitStatusTotal = intExitStatusTotal + RunCommand(CMD_SET_PRIVATE_STATIC,
"Setting the private adapter to static")
+'' Set the private adapter to static and remove the default gateway
+'intExitStatusTotal = intExitStatusTotal + RunCommand(CMD_SET_PRIVATE_STATIC,
"Setting the private adapter to static")
' Configure the routing table default gateways
intExitStatusTotal = intExitStatusTotal +
RunCommand(CMD_ROUTE_DELETE_GATEWAYS, "Deleting routes to default gateways")
intExitStatusTotal = intExitStatusTotal +
RunCommand(CMD_ROUTE_ADD_PUBLIC_GATEWAY, "Adding route to public default
gateway")
'intExitStatusTotal = intExitStatusTotal +
RunCommand(CMD_ROUTE_ADD_PRIVATE_GATEWAY, "Adding route to private default
gateway")
-' Configure the ntsyslog service to use the address of the private default
gateway (management node)
-RunCommand CMD_STOP_NTSYSLOG_SERVICE, "Stopping the ntsyslog service"
-WScript.Sleep 2000
-intExitStatusTotal = intExitStatusTotal + RunCommand(CMD_SET_NTSYSLOG_GATEWAY,
"Configuring ntsyslog to use private default gateway")
-intExitStatusTotal = intExitStatusTotal +
RunCommand(CMD_START_NTSYSLOG_SERVICE, "STARTING the ntsyslog service")
+'' Configure the ntsyslog service to use the address of the private default
gateway (management node)
+'RunCommand CMD_STOP_NTSYSLOG_SERVICE, "Stopping the ntsyslog service"
+'intExitStatusTotal = intExitStatusTotal +
RunCommand(CMD_SET_NTSYSLOG_GATEWAY, "Configuring ntsyslog to use private
default gateway")
+'intExitStatusTotal = intExitStatusTotal +
RunCommand(CMD_START_NTSYSLOG_SERVICE, "STARTING the ntsyslog service")
' Configure the firewall to allow ping, RDP and SSH on the private network
-print_hr
-
-If (Left(strWindowsVersion, 1) < 6) Then
- WScript.Echo "Windows version is " & strWindowsVersion & ", configuring
firewall with netsh firewall"
- intExitStatusTotal = intExitStatusTotal +
RunCommand(CMD_FIREWALL_ALLOW_PRIVATE_PING, "Allowing ping on the private
interface")
- intExitStatusTotal = intExitStatusTotal +
RunCommand(CMD_FIREWALL_ALLOW_PRIVATE_SSH, "Allowing SSH on the private
interface")
- intExitStatusTotal = intExitStatusTotal +
RunCommand(CMD_FIREWALL_ALLOW_PRIVATE_RDP, "Allowing RDP on the private
interface")
-Else
- WScript.Echo "Windows version is " & strWindowsVersion & ", configuring
firewall with netsh advfirewall"
- intExitStatusTotal = intExitStatusTotal +
RunCommand(CMD_ADVFIREWALL_ALLOW_PRIVATE_PING, "Allowing ping from private
addresses")
- intExitStatusTotal = intExitStatusTotal +
RunCommand(CMD_ADVFIREWALL_ALLOW_PRIVATE_SSH, "Allowing SSH from private
addresses")
- intExitStatusTotal = intExitStatusTotal +
RunCommand(CMD_ADVFIREWALL_ALLOW_PRIVATE_RDP, "Allowing RDP from private
addresses")
-End If
+'print_hr
-' Set the names of the adapters to Public and Private
-RunCommand CMD_SET_PRIVATE_NAME, "Setting the private adapter name to Private"
-RunCommand CMD_SET_PUBLIC_NAME, "Setting the public adapter name to Public"
+'If (Left(strWindowsVersion, 1) < 6) Then
+' WScript.Echo "Windows version is " & strWindowsVersion & ", configuring
firewall with netsh firewall"
+' intExitStatusTotal = intExitStatusTotal +
RunCommand(CMD_FIREWALL_ALLOW_PRIVATE_PING, "Allowing ping on the private
interface")
+' intExitStatusTotal = intExitStatusTotal +
RunCommand(CMD_FIREWALL_ALLOW_PRIVATE_SSH, "Allowing SSH on the private
interface")
+' 'intExitStatusTotal = intExitStatusTotal +
RunCommand(CMD_FIREWALL_ALLOW_PRIVATE_RDP, "Allowing RDP on the private
interface")
+'Else
+' WScript.Echo "Windows version is " & strWindowsVersion & ", configuring
firewall with netsh advfirewall"
+' intExitStatusTotal = intExitStatusTotal +
RunCommand(CMD_ADVFIREWALL_ALLOW_PRIVATE_PING, "Allowing ping from private
addresses")
+' intExitStatusTotal = intExitStatusTotal +
RunCommand(CMD_ADVFIREWALL_ALLOW_PRIVATE_SSH, "Allowing SSH from private
addresses")
+' 'intExitStatusTotal = intExitStatusTotal +
RunCommand(CMD_ADVFIREWALL_ALLOW_PRIVATE_RDP, "Allowing RDP from private
addresses")
+'End If
+
+'' Set the names of the adapters to Public and Private
+'RunCommand CMD_SET_PRIVATE_NAME, "Setting the private adapter name to Private"
+'RunCommand CMD_SET_PUBLIC_NAME, "Setting the public adapter name to Public"
' Print the routing table
RunCommand CMD_ROUTE_PRINT, "Printing routing table"
@@ -258,11 +260,11 @@
' 192.168.0.0 192.168.255.255
strPatternNotPublic = "^(10|127|192\.168|172\.(1[6-9]|2[0-9]|3[0-1]))\."
- intCheckAdapters = 1
- intLoopCount = 0
- Do While (intCheckAdapters <> 0 And intLoopCount < 3)
- intLoopCount = intLoopCount + 1
- intCheckAdapters = 0
+ 'intCheckAdapters = 1
+ 'intLoopCount = 0
+ 'Do While (intCheckAdapters <> 0 And intLoopCount < 3)
+ ' intLoopCount = intLoopCount + 1
+ ' intCheckAdapters = 0
' Renew the DHCP lease if not the first iteration
' This means DHCP was enabled on an adapter
@@ -320,20 +322,22 @@
PRIVATE_NAME = NA.NetConnectionID
WScript.Echo "* PRIVATE_NAME =
" & PRIVATE_NAME
WScript.Echo "* DHCP enabled =
" & NAC.DHCPEnabled
- If (NAC.DHCPEnabled = "False") Then
-
CMD_PRIVATE_ENABLE_DHCP=strSystem32 & "\netsh.exe interface ip set address
name=""" & PRIVATE_NAME & """ source=dhcp"
- RunCommand
CMD_PRIVATE_ENABLE_DHCP, "Enabling DHCP on the private adapter"
- intCheckAdapters = 1
- Else
+ 'If (NAC.DHCPEnabled = "False") Then
+ '
CMD_PRIVATE_ENABLE_DHCP=strSystem32 & "\netsh.exe interface ip set address
name=""" & PRIVATE_NAME & """ source=dhcp"
+ ' RunCommand
CMD_PRIVATE_ENABLE_DHCP, "Enabling DHCP on the private adapter"
+ ' intCheckAdapters = 1
+ 'Else
PRIVATE_IP = strIPAddress
PRIVATE_SUBNET_MASK =
Join(NAC.IPSubnet)
PRIVATE_DESCRIPTION =
NA.Description
- PRIVATE_GATEWAY =
Join(NAC.DefaultIPGateway)
+ If Not
IsNull(NAC.DefaultIPGateway) Then
+ PRIVATE_GATEWAY =
Join(NAC.DefaultIPGateway)
+ End If
WScript.Echo "* PRIVATE_IP
= " & PRIVATE_IP
WScript.Echo "*
PRIVATE_SUBNET_MASK = " & PRIVATE_SUBNET_MASK
WScript.Echo "* PRIVATE_GATEWAY
= " & PRIVATE_GATEWAY
WScript.Echo "*
PRIVATE_DESCRIPTION = " & PRIVATE_DESCRIPTION
- End If
+ 'End If
' Address is not a valid VCL private address
(10.*) but may still be private (192.168.* ...)
' Check if address is private
Elseif Len(strIPAddressMatchNotPublic) > 0 Then
@@ -344,25 +348,27 @@
PUBLIC_NAME = NA.NetConnectionID
WScript.Echo "* PUBLIC_NAME =
" & PUBLIC_NAME
WScript.Echo "* DHCP enabled =
" & NAC.DHCPEnabled
- If (NAC.DHCPEnabled = "False") Then
-
CMD_PUBLIC_ENABLE_DHCP=strSystem32 & "\netsh.exe interface ip set address
name=""" & PUBLIC_NAME & """ source=dhcp"
- RunCommand
CMD_PUBLIC_ENABLE_DHCP, "Enabling DHCP on the public adapter"
- intCheckAdapters = 1
- Else
+ 'If (NAC.DHCPEnabled = "False") Then
+ '
CMD_PUBLIC_ENABLE_DHCP=strSystem32 & "\netsh.exe interface ip set address
name=""" & PUBLIC_NAME & """ source=dhcp"
+ ' RunCommand
CMD_PUBLIC_ENABLE_DHCP, "Enabling DHCP on the public adapter"
+ ' intCheckAdapters = 1
+ 'Else
PUBLIC_IP = strIPAddress
PUBLIC_SUBNET_MASK =
Join(NAC.IPSubnet)
PUBLIC_DESCRIPTION =
NA.Description
- PUBLIC_GATEWAY =
Join(NAC.DefaultIPGateway)
+ If Not
IsNull(NAC.DefaultIPGateway) Then
+ PUBLIC_GATEWAY =
Join(NAC.DefaultIPGateway)
+ End If
WScript.Echo "* PUBLIC_IP
= " & PUBLIC_IP
WScript.Echo "*
PUBLIC_SUBNET_MASK = " & PUBLIC_SUBNET_MASK
WScript.Echo "* PUBLIC_GATEWAY
= " & PUBLIC_GATEWAY
WScript.Echo "*
PUBLIC_DESCRIPTION = " & PUBLIC_DESCRIPTION
- End If
+ 'End If
End If
Next
Next
- Loop
+ 'Loop
End function
'-----------------------------------------------------------------------------
@@ -397,7 +403,6 @@
print_hr
strCommand = "cmd.exe /c " & strCommand
WScript.Echo strDescription & ", command: " & strCommand
- Set objShell = CreateObject("WScript.Shell")
Set objExecResult = objShell.Exec(strCommand & " 2>&1")
If objExecResult.ProcessID = 0 And objExecResult.Status = 1 Then
@@ -410,7 +415,7 @@
WScript.StdOut.Write objExecResult.StdOut.ReadAll()
WScript.StdErr.Write objExecResult.StdErr.ReadAll()
If intStatus <> 0 Then Exit Do
- WScript.Sleep 10
+ 'WScript.Sleep 10
Loop
If objExecResult.ExitCode > 0 Then
Added: incubator/vcl/trunk/managementnode/tools/Windows/Scripts/debug_info.cmd
URL:
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/tools/Windows/Scripts/debug_info.cmd?rev=769054&view=auto
==============================================================================
--- incubator/vcl/trunk/managementnode/tools/Windows/Scripts/debug_info.cmd
(added)
+++ incubator/vcl/trunk/managementnode/tools/Windows/Scripts/debug_info.cmd Mon
Apr 27 16:37:23 2009
@@ -0,0 +1,70 @@
+...@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+rem DESCRIPTION:
+rem Displays various debugging information helpful in troubleshooting
+rem Windows image problems.
+
+set /A STATUS=0
+
+rem Get the name of this batch file and the directory it is running from
+set SCRIPT_NAME=%~n0
+set SCRIPT_FILENAME=%~nx0
+set SCRIPT_DIR=%~dp0
+rem Remove trailing slash from SCRIPT_DIR
+set SCRIPT_DIR=%SCRIPT_DIR:~0,-1%
+
+echo ======================================================================
+echo %SCRIPT_FILENAME% beginning to run at: %DATE% %TIME%
+echo Directory %SCRIPT_FILENAME% is running from: %SCRIPT_DIR%
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo Environment:
+set
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo Querying HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DevicePath
registry key...
+"%SystemRoot%\system32\reg.exe" query
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion /v DevicePath 2>&1
+echo ERRORLEVEL: %ERRORLEVEL%
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo Querying HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run registry
key...
+"%SystemRoot%\system32\reg.exe" query
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run 2>&1
+echo ERRORLEVEL: %ERRORLEVEL%
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo Displaying contents of scripts.ini...
+type "%SYSTEMROOT%\system32\GroupPolicy\User\Scripts\scripts.ini" 2>&1
+echo ERRORLEVEL: %ERRORLEVEL%
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo %SCRIPT_FILENAME% finished at: %DATE% %TIME%
+echo exiting with status: %STATUS%
+"%SystemRoot%\system32\eventcreate.exe" /T INFORMATION /L APPLICATION /SO
%SCRIPT_FILENAME% /ID 555 /D "exit status: %STATUS%" 2>&1
+
+echo.
+echo.
+exit /B %STATUS%
Added:
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/delete_post_load_run_key.cmd
URL:
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/tools/Windows/Scripts/delete_post_load_run_key.cmd?rev=769054&view=auto
==============================================================================
---
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/delete_post_load_run_key.cmd
(added)
+++
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/delete_post_load_run_key.cmd
Mon Apr 27 16:37:23 2009
@@ -0,0 +1,52 @@
+...@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+rem DESCRIPTION:
+rem This script is called by post_load.cmd after it has completed most
+rem of its configuration tasks when the root account is logged in.
+rem This script deletes the registry entry under
+rem HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run.
+rem which causes post_load.cmd to be executed automatically.
+
+set /A STATUS=0
+
+rem Get the name of this batch file and the directory it is running from
+set SCRIPT_NAME=%~n0
+set SCRIPT_FILENAME=%~nx0
+set SCRIPT_DIR=%~dp0
+rem Remove trailing slash from SCRIPT_DIR
+set SCRIPT_DIR=%SCRIPT_DIR:~0,-1%
+
+echo ======================================================================
+echo %SCRIPT_FILENAME% beginning to run at: %DATE% %TIME%
+echo Directory %SCRIPT_FILENAME% is running from: %SCRIPT_DIR%
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo Deleting registry HKLM-Run command to run post_load.cmd...
+"%SystemRoot%\system32\reg.exe" DELETE
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v
"post_load.cmd" /f
+echo ERRORLEVEL: %ERRORLEVEL%
+set /A STATUS+=%ERRORLEVEL%
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo %SCRIPT_FILENAME% finished at: %DATE% %TIME%
+echo exiting with status: %STATUS%
+"%SystemRoot%\system32\eventcreate.exe" /T INFORMATION /L APPLICATION /SO
%SCRIPT_FILENAME% /ID 555 /D "exit status: %STATUS%" 2>&1
+
+exit /B %STATUS%
Added: incubator/vcl/trunk/managementnode/tools/Windows/Scripts/post_load.cmd
URL:
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/tools/Windows/Scripts/post_load.cmd?rev=769054&view=auto
==============================================================================
--- incubator/vcl/trunk/managementnode/tools/Windows/Scripts/post_load.cmd
(added)
+++ incubator/vcl/trunk/managementnode/tools/Windows/Scripts/post_load.cmd Mon
Apr 27 16:37:23 2009
@@ -0,0 +1,122 @@
+...@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+rem DESCRIPTION:
+rem Runs automatically after an image has be loaded onto the hard drive.
+rem Performs tasks necessary to configure the computer so the management
+rem node can communicate with it via SSH.
+rem This script should do as little as possible and hand off other tasks
+rem to the management node where possible to minimize the configuration
+rem tasks saved in images.
+
+set /A STATUS=0
+
+rem Get the name of this batch file and the directory it is running from
+set SCRIPT_NAME=%~n0
+set SCRIPT_FILENAME=%~nx0
+set SCRIPT_DIR=%~dp0
+rem Remove trailing slash from SCRIPT_DIR
+set SCRIPT_DIR=%SCRIPT_DIR:~0,-1%
+
+set LOGS_DIR=%SCRIPT_DIR%\..\Logs\%SCRIPT_NAME%
+if not exist %LOGS_DIR% mkdir %LOGS_DIR%
+
+echo ======================================================================
+echo %SCRIPT_FILENAME% beginning to run at: %DATE% %TIME%
+echo Directory %SCRIPT_FILENAME% is running from: %SCRIPT_DIR%
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo %TIME%: Calling %SCRIPT_DIR%\debug_info.cmd...
+echo *** %SCRIPT_FILENAME% start: *** >> %LOGS_DIR%\debug_info.log
+start "debug_info.cmd" /WAIT cmd.exe /c "%SCRIPT_DIR%\debug_info.cmd >>
%LOGS_DIR%\debug_info.log 2>&1"
+echo.
+
+
+echo ----------------------------------------------------------------------
+
+echo %TIME%: Calling %SCRIPT_DIR%\configure_networking.vbs...
+start "configure_networking.vbs" /WAIT cmd.exe /c
"C:\Windows\system32\cscript.exe //NoLogo %SCRIPT_DIR%\configure_networking.vbs
>> %LOGS_DIR%\configure_networking.log 2>&1"
+echo ERRORLEVEL: %ERRORLEVEL%
+set /A STATUS+=%ERRORLEVEL%
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo %TIME%: Calling %SCRIPT_DIR%\update_cygwin.cmd...
+start "update_cygwin.cmd" /WAIT cmd.exe /c "%SCRIPT_DIR%\update_cygwin.cmd >>
%LOGS_DIR%\update_cygwin.log 2>&1"
+echo ERRORLEVEL: %ERRORLEVEL%
+set /A STATUS+=%ERRORLEVEL%
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo %TIME%: Calling %SCRIPT_DIR%\autologon_disable.cmd...
+start "autologon_disable.cmd" /WAIT cmd.exe /c
"%SCRIPT_DIR%\autologon_disable.cmd >> %LOGS_DIR%\autologon_disable.log 2>&1"
+echo ERRORLEVEL: %ERRORLEVEL%
+set /A STATUS+=%ERRORLEVEL%
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo %TIME%: Executing %SCRIPT_DIR%\delete_post_load_run_key.cmd...
+start "delete_post_load_run_key.cmd" /WAIT cmd.exe /c
"%SCRIPT_DIR%\delete_post_load_run_key.cmd >>
%LOGS_DIR%\delete_post_load_run_key.log 2>&1"
+echo ERRORLEVEL: %ERRORLEVEL%
+set /A STATUS+=%ERRORLEVEL%
+echo.
+
+echo ----------------------------------------------------------------------
+
+if exist "%SystemRoot%\post_load_custom.cmd" goto POST_LOAD_CUSTOM
+echo Custom post-load script does not exist:
"%SystemRoot%\post_load_custom.cmd"
+goto EVENT_CREATE
+
+:POST_LOAD_CUSTOM
+echo %TIME%: Executing %SystemRoot%\post_load_custom.cmd...
+start "post_load_custom.cmd" /WAIT cmd.exe /c
"%SystemRoot%\post_load_custom.cmd >> %LOGS_DIR%\post_load_custom.log 2>&1"
+echo ERRORLEVEL: %ERRORLEVEL%
+set /A STATUS+=%ERRORLEVEL%
+echo.
+
+:EVENT_CREATE
+echo ----------------------------------------------------------------------
+
+echo %TIME%: Generating application event log entry: %COMPUTERNAME% is READY...
+"%SystemRoot%\system32\eventcreate.exe" /T INFORMATION /L APPLICATION /SO
%SCRIPT_FILENAME% /ID 555 /D "%COMPUTERNAME% is READY." 2>&1
+echo ERRORLEVEL: %ERRORLEVEL%
+set /A STATUS+=%ERRORLEVEL%
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo %TIME%: Calling %SCRIPT_DIR%\debug_info.cmd...
+echo *** %SCRIPT_FILENAME% end: *** >> %LOGS_DIR%\debug_info.log
+start "debug_info.cmd" /WAIT cmd.exe /c "%SCRIPT_DIR%\debug_info.cmd >>
%LOGS_DIR%\debug_info.log 2>&1"
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo %SCRIPT_FILENAME% finished at: %DATE% %TIME%
+echo exiting with status: %STATUS%
+"%SystemRoot%\system32\eventcreate.exe" /T INFORMATION /L APPLICATION /SO
%SCRIPT_FILENAME% /ID 555 /D "exit status: %STATUS%" 2>&1
+
+echo.
+echo Logging off %USERNAME%...
+"%SystemRoot%\system32\logoff.exe" /V 2>&1
+echo.
+
+exit /B %STATUS%
Modified:
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/set_computer_name.vbs
URL:
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/tools/Windows/Scripts/set_computer_name.vbs?rev=769054&r1=769053&r2=769054&view=diff
==============================================================================
---
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/set_computer_name.vbs
(original)
+++
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/set_computer_name.vbs
Mon Apr 27 16:37:23 2009
@@ -14,7 +14,7 @@
' limitations under the License.
strCurrentImagePath = "C:\Cygwin\home\root\currentimage.txt"
-strSetnameLogfile = "C:\Cygwin\home\root\VCL\Logs\wsname_output.log"
+strSetnameLogfile =
"C:\Cygwin\home\root\VCL\Logs\sysprep_cmdlines\wsname_output.log"
strWSNamePath = "C:\Cygwin\home\root\VCL\Utilities\WSName\wsname.exe"
Set objShell = WScript.CreateObject("WScript.Shell")
Added:
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/sysprep_cmdlines.cmd
URL:
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/tools/Windows/Scripts/sysprep_cmdlines.cmd?rev=769054&view=auto
==============================================================================
---
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/sysprep_cmdlines.cmd
(added)
+++
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/sysprep_cmdlines.cmd
Mon Apr 27 16:37:23 2009
@@ -0,0 +1,92 @@
+...@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+rem DESCRIPTION:
+rem This script runs automatically during Sysprep's minisetup stage. It gets
+rem called by the Sysprep process because this script has been specified in
+rem the Sysprep\i386\$oem$\cmdlines.txt file.
+rem It performs steps that cannot be done prior to running Sysprep but before
+rem loading Windows for the first time. The steps include setting the computer
+rem name and enabling AutoAdminLogon.
+
+set /A STATUS=0
+
+rem Get the name of this batch file and the directory it is running from
+set SCRIPT_NAME=%~n0
+set SCRIPT_FILENAME=%~nx0
+set SCRIPT_DIR=%~dp0
+rem Remove trailing slash from SCRIPT_DIR
+set SCRIPT_DIR=%SCRIPT_DIR:~0,-1%
+
+set LOGS_DIR=%SCRIPT_DIR%\..\Logs\%SCRIPT_NAME%
+if not exist %LOGS_DIR% mkdir %LOGS_DIR%
+
+echo ======================================================================
+echo %SCRIPT_FILENAME% beginning to run at: %DATE% %TIME%
+echo Directory %SCRIPT_FILENAME% is running from: %SCRIPT_DIR%
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo %TIME%: Calling %SCRIPT_DIR%\debug_info.cmd...
+echo *** %SCRIPT_FILENAME% start: *** >> %LOGS_DIR%\debug_info.log
+start "debug_info.cmd" /WAIT cmd.exe /c "%SCRIPT_DIR%\debug_info.cmd >>
%LOGS_DIR%\debug_info.log 2>&1"
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo Sleeping for 5 seconds to allow networking to initialize...
+C:\Cygwin\bin\sleep.exe 5 2>&1
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo %TIME%: Executing %SCRIPT_DIR%\autologon_enable.cmd...
+start "autologon_enable.cmd" /WAIT cmd.exe /c
"%SCRIPT_DIR%\autologon_enable.cmd >> %LOGS_DIR%\autologon_enable.log 2>&1"
+echo ERRORLEVEL: %ERRORLEVEL%
+set /A STATUS+=%ERRORLEVEL%
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo %TIME%: Executing %SCRIPT_DIR%\add_post_load_run_key.cmd...
+start "add_post_load_run_key.cmd" /WAIT cmd.exe /c
"%SCRIPT_DIR%\add_post_load_run_key.cmd >> %LOGS_DIR%\add_post_load_run_key.log
2>&1"
+echo ERRORLEVEL: %ERRORLEVEL%
+set /A STATUS+=%ERRORLEVEL%
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo %TIME%: Executing %SCRIPT_DIR%\set_computer_name.vbs...
+start "set_computer_name.vbs" /WAIT cmd.exe /c
"C:\Windows\system32\cscript.exe //NoLogo %SCRIPT_DIR%\set_computer_name.vbs >>
%LOGS_DIR%\set_computer_name.log 2>&1"
+echo ERRORLEVEL: %ERRORLEVEL%
+set /A STATUS+=%ERRORLEVEL%
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo %TIME%: Calling %SCRIPT_DIR%\debug_info.cmd...
+echo *** %SCRIPT_FILENAME% end: *** >> %LOGS_DIR%\debug_info.log
+start "debug_info.cmd" /WAIT cmd.exe /c "%SCRIPT_DIR%\debug_info.cmd >>
%LOGS_DIR%\debug_info.log 2>&1"
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo %SCRIPT_FILENAME% finished at: %DATE% %TIME%
+echo exiting with status: %STATUS%
+"%SystemRoot%\system32\eventcreate.exe" /T INFORMATION /L APPLICATION /SO
%SCRIPT_FILENAME% /ID 555 /D "exit status: %STATUS%" 2>&1
+
+exit /B %STATUS%
Added:
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/system_startup.cmd
URL:
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/tools/Windows/Scripts/system_startup.cmd?rev=769054&view=auto
==============================================================================
--- incubator/vcl/trunk/managementnode/tools/Windows/Scripts/system_startup.cmd
(added)
+++ incubator/vcl/trunk/managementnode/tools/Windows/Scripts/system_startup.cmd
Mon Apr 27 16:37:23 2009
@@ -0,0 +1,72 @@
+...@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+rem DESCRIPTION:
+rem
+
+set /A STATUS=0
+
+rem Get the name of this batch file and the directory it is running from
+set SCRIPT_NAME=%~n0
+set SCRIPT_FILENAME=%~nx0
+set SCRIPT_DIR=%~dp0
+rem Remove trailing slash from SCRIPT_DIR
+set SCRIPT_DIR=%SCRIPT_DIR:~0,-1%
+
+set LOGS_DIR=%SCRIPT_DIR%\..\Logs\%SCRIPT_NAME%
+if not exist %LOGS_DIR% mkdir %LOGS_DIR%
+
+echo ======================================================================
+echo %SCRIPT_FILENAME% beginning to run at: %DATE% %TIME%
+echo Directory %SCRIPT_FILENAME% is running from: %SCRIPT_DIR%
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo %TIME%: Calling %SCRIPT_DIR%\debug_info.cmd...
+echo *** %SCRIPT_FILENAME% start: *** >> %LOGS_DIR%\debug_info.log
+start "debug_info.cmd" /WAIT cmd.exe /c "%SCRIPT_DIR%\debug_info.cmd >>
%LOGS_DIR%\debug_info.log 2>&1"
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo %TIME%: Calling %SCRIPT_DIR%\configure_networking.vbs...
+start "configure_networking.vbs" /MIN /WAIT cmd.exe /c "cscript.exe //NoLogo
%SCRIPT_DIR%\configure_networking.vbs >> %LOGS_DIR%\configure_networking.log
2>&1"
+echo ERRORLEVEL: %ERRORLEVEL%
+set /A STATUS+=%ERRORLEVEL%
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo %TIME%: Calling %SCRIPT_DIR%\update_cygwin.cmd...
+start "update_cygwin.cmd" /MIN /WAIT cmd.exe /c
"%SCRIPT_DIR%\update_cygwin.cmd >> %LOGS_DIR%\update_cygwin.log 2>&1"
+echo ERRORLEVEL: %ERRORLEVEL%
+set /A STATUS+=%ERRORLEVEL%
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo %TIME%: Calling %SCRIPT_DIR%\debug_info.cmd...
+echo *** %SCRIPT_FILENAME% end: *** >> %LOGS_DIR%\debug_info.log
+start "debug_info.cmd" /WAIT cmd.exe /c "%SCRIPT_DIR%\debug_info.cmd >>
%LOGS_DIR%\debug_info.log 2>&1"
+echo.
+
+echo ----------------------------------------------------------------------
+
+echo %SCRIPT_FILENAME% finished at: %DATE% %TIME%
+echo exiting with status: %STATUS%
+"%SystemRoot%\system32\eventcreate.exe" /T INFORMATION /L APPLICATION /SO
%SCRIPT_FILENAME% /ID 555 /D "exit status: %STATUS%" 2>&1
+exit /B %STATUS%
Modified:
incubator/vcl/trunk/managementnode/tools/Windows/Scripts/update_cygwin.cmd
URL:
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/tools/Windows/Scripts/update_cygwin.cmd?rev=769054&r1=769053&r2=769054&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/tools/Windows/Scripts/update_cygwin.cmd
(original)
+++ incubator/vcl/trunk/managementnode/tools/Windows/Scripts/update_cygwin.cmd
Mon Apr 27 16:37:23 2009
@@ -14,15 +14,24 @@
rem See the License for the specific language governing permissions and
rem limitations under the License.
-rem This script reconfigures the Cygwin sshd service.
-rem It regenerates the computer's host keys. This is necessary
-rem when Sysprep is run and a new SID is generated.
-rem This script MUST be run by the root account or else the
-rem sshd service will not start.
+rem DESCRIPTION:
+rem This script reconfigures the Cygwin sshd service. It regenerates the
+rem computer's SSH host keys. This is necessary when Sysprep is run and
+rem new SIDs are generated. This script MUST be run by the root account
+rem or else the sshd service will not start.
+
set /A STATUS=0
+rem Get the name of this batch file and the directory it is running from
+set SCRIPT_NAME=%~n0
+set SCRIPT_FILENAME=%~nx0
+set SCRIPT_DIR=%~dp0
+rem Remove trailing slash from SCRIPT_DIR
+set SCRIPT_DIR=%SCRIPT_DIR:~0,-1%
+
echo ======================================================================
-echo %~nx0 beginning to run at: %DATE% %TIME%
+echo %SCRIPT_FILENAME% beginning to run at: %DATE% %TIME%
+echo Directory %SCRIPT_FILENAME% is running from: %SCRIPT_DIR%
echo.
echo ----------------------------------------------------------------------
@@ -137,6 +146,10 @@
set /A STATUS+=%ERRORLEVEL%
echo.
-echo %~nx0 finished at: %DATE% %TIME%
+echo ----------------------------------------------------------------------
+
+echo %SCRIPT_FILENAME% finished at: %DATE% %TIME%
echo exiting with status: %STATUS%
+"%SystemRoot%\system32\eventcreate.exe" /T INFORMATION /L APPLICATION /SO
%SCRIPT_FILENAME% /ID 555 /D "exit status: %STATUS%" 2>&1
+
exit /B %STATUS%
Modified:
incubator/vcl/trunk/managementnode/tools/Windows/Utilities/Sysprep/i386/$oem$/cmdlines.txt
URL:
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/tools/Windows/Utilities/Sysprep/i386/%24oem%24/cmdlines.txt?rev=769054&r1=769053&r2=769054&view=diff
==============================================================================
---
incubator/vcl/trunk/managementnode/tools/Windows/Utilities/Sysprep/i386/$oem$/cmdlines.txt
(original)
+++
incubator/vcl/trunk/managementnode/tools/Windows/Utilities/Sysprep/i386/$oem$/cmdlines.txt
Mon Apr 27 16:37:23 2009
@@ -1,2 +1,2 @@
[Commands]
-"cmd.exe /c C:\Cygwin\home\root\VCL\Scripts\cmdlines.cmd >
C:\Cygwin\home\root\VCL\Logs\cmdlines.log 2>&1"
+"cmd.exe /c C:\Cygwin\home\root\VCL\Scripts\sysprep_cmdlines.cmd >
C:\Cygwin\home\root\VCL\Logs\sysprep_cmdlines.log 2>&1"