You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by jf...@apache.org on 2008/12/12 19:20:18 UTC

svn commit: r726079 [3/32] - in /incubator/vcl/tags/import: ./ managementnode/ managementnode/bin/ managementnode/etc/ managementnode/etc/vcl/ managementnode/legacy_vcl_vbs_scripts/ managementnode/lib/ managementnode/lib/VCL/ managementnode/lib/VCL/Mod...

Added: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/VCLprepare1.vbs
URL: http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/VCLprepare1.vbs?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/VCLprepare1.vbs (added)
+++ incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/VCLprepare1.vbs Fri Dec 12 10:20:10 2008
@@ -0,0 +1,396 @@
+On Error Resume Next
+Set oWshShell = CreateObject("WScript.Shell")
+Set oWshEnvironment = oWshShell.Environment("Process")
+sCurrentName = oWshEnvironment("COMPUTERNAME")
+sTempDir = oWshEnvironment("TEMP")
+'WScript.Echo "COMPUTERNAME = " & sCurrentName
+'WScript.Echo "Temp directory = " & sTempDir
+Dim MACLASTNUMDEC
+Dim MACLASTNUMHEX
+Dim oExec
+Const ForWriting = 2
+Const ForAppending = 8
+check = ""
+
+strComputer = "."
+Set objWMIService = GetObject("winmgmts:\\"& strComputer & "\root\cimv2")
+
+' open log file to record all actions taken
+set objFSO = CreateObject("Scripting.FileSystemObject")
+Set objTextFile = objFSO.OpenTextFile _
+    (sTempDir & "\VCLprepare.log", ForAppending, True)
+objTextFile.WriteLine("========================================================================")
+objTextFile.WriteLine(Now & " : VCLprepare1.vbs : script started")
+
+
+
+WScript.Echo "#### This is VCLprepare1.vbs script ####"
+WScript.Echo "Waiting for NTsyslog service..."
+' Wait until NTsyslog service started
+started = 0
+Do While started = 0
+   Set colRunningServices = objWMIService.ExecQuery ("Select * from Win32_Service")
+   For Each objService in colRunningServices 
+      If (objService.DisplayName = "NTsyslog") AND (objService.State = "Running") Then
+         started = 1
+      End If
+   Next
+   WScript.Sleep 100
+Loop
+WScript.Sleep 5000
+WScript.Echo "NTsyslog service is up."
+objTextFile.WriteLine(Now & " : VCLprepare1.vbs : NTsyslog service is up")
+
+' Write what happening along the way to Setup Event Log
+strCommand = "eventcreate /T Information /ID 101 /L Setup /SO " & Chr(34) & "VCLprepare1.vbs" & _
+             Chr(34) & " /D " & Chr(34) & "VCLprepare1.vbs script started." & Chr(34)
+Set oExec = oWshShell.Exec(strcommand)
+Do While oExec.Status = 0
+     WScript.Sleep 100
+Loop
+
+' execute one more time to insure it goes to right EventLog
+Set oExec = oWshShell.Exec(strcommand)
+Do While oExec.Status = 0
+     WScript.Sleep 100
+Loop 
+ 
+Set colAdapters = objWMIService.ExecQuery _
+    ("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
+
+' wait until both network adapters are available
+WScript.Echo "Waiting on network adapters:"
+objTextFile.WriteLine(Now & " : VCLprepare1.vbs : Waiting on network adapters:")
+
+num_adapters = 0
+currIndex1 = ""
+currIndex2 = ""
+n = 5
+
+Do While num_adapters < 2
+  Set colItems = objWMIService.ExecQuery("Select * from Win32_NetworkAdapter",,48)
+  For Each objItem in colItems
+    If Not IsNull(objItem.Index) AND Not IsNull(objItem.MACAddress) AND Not IsNull(objItem.NetConnectionID) Then
+'       WScript.Echo "Index = " & objItem.Index
+'       WScript.Echo "MACAddress = " & objItem.MACAddress
+'       WScript.Echo "NetConnectionID = " & objItem.NetConnectionID
+       If Not currIndex1 = objItem.Index Then
+         If currIndex1 = "" Then
+           currIndex1 = objItem.Index
+'           WScript.Echo "currIndex1 = '" & objItem.Index & "'"
+           num_adapters = num_adapters + 1
+         Else
+           currIndex2 = objItem.Index
+'           WScript.Echo "currIndex2 = '" & objItem.Index & "'"
+           num_adapters = num_adapters + 1
+         End If
+       End If
+    End If
+  Next
+  If num_adapters < 2 Then
+    WScript.Sleep 5000
+    WScript.Echo n & "sec"
+    n = n + 5
+  End If
+Loop
+
+WScript.Echo "num_adapters = " & num_adapters
+'WScript.Echo "currIndex1 = '" & currIndex1 & "'"
+'WScript.Echo "currIndex2 = '" & currIndex2 & "'"
+objTextFile.WriteLine(Now & " : VCLprepare1.vbs : num_adapters = " & num_adapters & " (should be 2)")
+
+' determine names for network adapters based on their MAC addresses:
+' adapter with even MAC will be FirstAdapter - LAN interface
+' adapter with odd MAC will be SecondAdapter - WAN interface
+
+Set colAdapters = objWMIService.ExecQuery _
+    ("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
+For Each objAdapter in colAdapters
+   If objAdapter.Index = currIndex1 OR objAdapter.Index = currIndex2 Then
+'     WScript.Echo "Index = " & objAdapter.Index
+     AdapterMAC = objAdapter.MACAddress
+'     WScript.Echo "MAC = " & AdapterMAC
+     MACArray = Split(AdapterMAC, ":")
+     MACLASTNUMHEX = Trim(MACArray(5))
+'     WScript.Echo "Last MAC number (HEX) = " & MACLASTNUMHEX
+     MACLASTNUMDEC = CInt("&H" & MACLASTNUMHEX)
+'     WScript.Echo "Last MAC number (DEC) = " & MACLASTNUMDEC
+     reminder = MACLASTNUMDEC Mod 2
+'     WScript.Echo "Reminder of last MAC number = " & reminder
+     If reminder = 0 Then
+       FirstAdapterIndex = objAdapter.Index
+       If Not IsNull(objAdapter.IPAddress) Then
+         For i = 0 To UBound(objAdapter.IPAddress)
+           FirstAdapterIP = objAdapter.IPAddress(i)
+         Next
+       End If
+     Else
+       SecondAdapterIndex = objAdapter.Index
+       If Not IsNull(objAdapter.IPAddress) Then
+         For i = 0 To UBound(objAdapter.IPAddress)
+           SecondAdapterIP = objAdapter.IPAddress(i)
+         Next
+       End If
+     End If
+'     WScript.Echo "============================" 
+   End If
+Next
+
+Set colItems = objWMIService.ExecQuery("Select * from Win32_NetworkAdapter",,48)
+For Each objItem in colItems
+  If objItem.Index = FirstAdapterIndex Then
+    FirstAdapterName = objItem.NetConnectionID
+  End If
+  If objItem.Index = SecondAdapterIndex Then
+    SecondAdapterName = objItem.NetConnectionID
+  End If
+
+Next
+WScript.Echo "First Adapter Name  (LAN): " & FirstAdapterName
+WScript.Echo "First Adapter Index (LAN): " & FirstAdapterIndex
+WScript.Echo "First Adapter IP    (LAN): " & FirstAdapterIP
+WScript.Echo "Second Adapter Name  (WAN): " & SecondAdapterName
+WScript.Echo "Second Adapter Index (WAN): " & SecondAdapterIndex
+WScript.Echo "Second Adapter IP    (WAN): " & SecondAdapterIP
+objTextFile.WriteLine(Now & " : VCLprepare1.vbs : First Adapter Name  (LAN): " & FirstAdapterName)
+objTextFile.WriteLine(Now & " : VCLprepare1.vbs : First Adapter Index (LAN): " & FirstAdapterIndex)
+objTextFile.WriteLine(Now & " : VCLprepare1.vbs : First Adapter IP    (LAN): " & FirstAdapterIP)
+objTextFile.WriteLine(Now & " : VCLprepare1.vbs : Second Adapter Name  (WAN): " & SecondAdapterName)
+objTextFile.WriteLine(Now & " : VCLprepare1.vbs : Second Adapter Index (WAN): " & SecondAdapterIndex)
+objTextFile.WriteLine(Now & " : VCLprepare1.vbs : Second Adapter IP    (WAN): " & SecondAdapterIP)
+
+' Write Second Adapter Name (WAN) to file in %TEMP% directory
+set objFSO1 = CreateObject("Scripting.FileSystemObject")
+Set objTextFile1 = objFSO1.OpenTextFile _
+    (sTempDir & "\WANname.txt", ForWriting, True)
+objTextFile1.WriteLine(SecondAdapterName)
+objTextFile1.Close
+
+
+' Assign new IP address to "WAN" adapter
+
+IPArray = Split(FirstAdapterIP, ".")
+MYWANIP = Array("152.1.14." & IPArray(3))
+WScript.Echo "MYWANIP = " & MYWANIP(0)
+MYWANSubnetMask = Array("255.255.255.0")
+MYWANGateway = Array("152.1.14.1")
+MYWANGatewayMetric = Array(1)
+
+' Setup static IP address for "WAN" adapter
+
+Set colNetAdapters = objWMIService.ExecQuery _
+    ("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
+
+For Each objNetAdapter in colNetAdapters
+ If objNetAdapter.Index = SecondAdapterIndex Then
+    errEnable = objNetAdapter.EnableStatic(MYWANIP, MYWANSubnetMask)
+    errGateways = objNetAdapter.SetGateways(MYWANGateway, MYWANGatewaymetric)
+    arrDNSServers = Array("152.1.1.161", "152.1.1.248")
+    errDNS = objNetAdapter.SetDNSServerSearchOrder(arrDNSServers)
+
+    If errEnable = 0 Then
+       WScript.Echo "The IP address has been changed."
+       objTextFile.WriteLine(Now & " : VCLprepare1.vbs : WAN interface was configured successfully.")
+       strCommand = "eventcreate /T Information /ID 102 /L Setup /SO " & Chr(34) & "VCLprepare1.vbs" & _
+                    Chr(34) & " /D " & Chr(34) & "WAN interface was configured successfully." & Chr(34)
+    Else
+       WScript.Echo "The IP address could not be changed."
+       WScript.Echo "Error = " & errEnable
+       objTextFile.WriteLine(Now & " : VCLprepare1.vbs : WAN interface could not be configured. Error: " & errEnable)
+       strCommand = "eventcreate /T Error /ID 103 /L Setup /SO " & Chr(34) & "VCLprepare1.vbs" & _
+                    Chr(34) & " /D " & Chr(34) & "WAN interface could not be configured. Error: " & errEnable & Chr(34)
+    End If
+ ' Record result in Setup Event Log
+    Set oExec = oWshShell.Exec(strcommand)
+    Do While oExec.Status = 0
+       WScript.Sleep 100
+    Loop
+ 
+ End If
+Next
+WScript.Sleep 1000
+
+' turn back on pagefile
+objTextFile.WriteLine(Now & " : VCLprepare1.vbs : enable page file")
+strCommand = "reg.exe add " & Chr(34) & _
+  "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" & Chr(34) &_
+  " /v PagingFiles /d " & Chr(34) & "c:\pagefile.sys 2046 4092" & Chr(34) & " /t REG_MULTI_SZ /f"
+Set oExec = oWshShell.Exec(strcommand)
+Do While oExec.Status = 0
+   WScript.Sleep 100
+Loop
+check = oWshShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PagingFiles")
+
+objTextFile.WriteLine(Now & " : CHECK (PagingFiles registry entry): '" & check(0) & "' (should be ... 2046 4092)")
+
+
+' to insure proper rename procedure disable WAN interface (adapter with odd MAC address)
+WScript.Echo "Disabling WAN interface..."
+oWshShell.Run "cscript.exe " & sTempDir & "\vcl\disWAN.vbs", 0, TRUE
+WScript.Echo "Done!"
+
+WScript.Echo "Renaming computer... "
+objTextFile.WriteLine(Now & " : VCLprepare1.vbs : Renaming computer using WSName.exe")
+
+Set oExec = oWshShell.Exec(sTempDir & "\vcl\WSName.exe /N:%DNS /MCN /NOREBOOT")
+Do While oExec.Status = 0
+     WScript.Sleep 100
+Loop
+
+If oExec.ExitCode <> 0 Then
+' Could not rename computer - better stop here
+' it could be not bad - simply old and new names match or
+' it could be bad - something else went wrong
+   WScript.Echo "Warning: Non-zero exit code"
+   objTextFile.WriteLine(Now & " : VCLprepare1.vbs : WSName.exe : non-zero exit code")
+
+   If oExec.ExitCode = 7 Then
+     WScript.Echo "Computer's new and old names match! Rename aborted!"
+     strCommand = "eventcreate /T Warning /ID 105 /L Setup /SO " & Chr(34) & "VCLprepare1.vbs" & _
+                Chr(34) & " /D " & Chr(34) & "Computer's name doesn't need to be changed." & Chr(34)
+     objTextFile.WriteLine(Now & " : VCLprepare1.vbs : WSName.exe : new and old names match. Rename aborted.")
+     objTextFile.WriteLine(Now & " : VCLprepare1.vbs : Most likely it's the same computer after creating image")
+' ' Turn off auto-login
+'     objTextFile.WriteLine(Now & " : VCLprepare1.vbs : disable Auto-Logon")
+'     oWshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon", "0"
+
+'     check = oWshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon")
+
+'     objTextFile.WriteLine(Now & " : CHECK (AutoAdminLogon registry entry): " & check & " (should be 0)")
+ ' Record result in Setup Event Log
+     Set oExec = oWshShell.Exec(strcommand)
+     Do While oExec.Status = 0
+       WScript.Sleep 100
+     Loop
+
+ ' Setup to run finish.vbs script after reboot
+     objTextFile.WriteLine(Now & " : VCLprepare1.vbs : setup RunOnce 'finish.vbs' after reboot")
+
+     oWshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\step2", "cmd.exe /c cscript.exe " & sTempDir & "\vcl\finish.vbs"
+
+     WScript.Sleep 1000
+
+     check = oWshShell.RegRead("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\step2")
+
+     objTextFile.WriteLine(Now & " : CHECK (RunOnce registry entry): " & check)
+
+     strCommand = "eventcreate /T Information /ID 107 /L Setup /SO " & Chr(34) & "VCLprepare1.vbs" & _
+                Chr(34) & " /D " & Chr(34) & "VCLprepare1.vbs script finished." & Chr(34)
+     Set oExec = oWshShell.Exec(strcommand)
+     Do While oExec.Status = 0
+       WScript.Sleep 100
+     Loop
+     objTextFile.WriteLine(Now & " : VCLprepare1.vbs : script finished")
+     objTextFile.WriteLine("========================================================================")
+ 'close log file handler
+     objTextFile.Close
+
+ 'reboot computer to activate page file
+
+     Set objWMIService = GetObject("winmgmts:" _
+        & "{impersonationLevel=impersonate,(Shutdown)}!\\" & strComputer & "\root\cimv2")
+     Set colOperatingSystems = objWMIService.ExecQuery _
+        ("Select * from Win32_OperatingSystem")
+     For Each objOperatingSystem in colOperatingSystems
+        ObjOperatingSystem.Reboot()
+     Next
+
+     WScript.Quit
+
+'     strCommand = "eventcreate /T Information /ID 111 /L Setup /SO " & Chr(34) & "VCLprepare1.vbs" & _
+'             Chr(34) & " /D " & Chr(34) & lcase(sCurrentName) & " is READY." & Chr(34)
+'     Set oExec = oWshShell.Exec(strcommand)
+'     Do While oExec.Status = 0
+'       WScript.Sleep 100
+'     Loop
+'     objTextFile.WriteLine(Now & " : VCLprepare1.vbs : " & lcase(sCurrentName) & " is READY.")
+'     objTextFile.WriteLine("========================================================================")
+
+   Else
+     WScript.Echo "Something went wrong while renaming computer!"
+     WScript.Echo "Exit code: " & oExec.ExitCode
+     WScript.Echo "Check WSName.log in %TEMP% directory for details."
+     objTextFile.WriteLine(Now & " : VCLprepare1.vbs : WSName.exe : something went wrong while renaming computer.")
+     objTextFile.WriteLine(Now & " : VCLprepare1.vbs : WSName.exe : Exit code: " & oExec.ExitCode)
+     objTextFile.WriteLine(Now & " : VCLprepare1.vbs : WSName.exe : Check WSName.log in %TEMP% directory for details.")
+     strCommand = "eventcreate /T Error /ID 106 /L Setup /SO " & Chr(34) & "VCLprepare1.vbs" & Chr(34) & _
+                " /D " & Chr(34) & "Computer's name could not be changed. WSName.exe Exit code: " & _
+                oExec.ExitCode & " Check WSName.log in %TEMP% directory for details." & Chr(34)
+ ' Record result in Setup Event Log
+     Set oExec = oWshShell.Exec(strcommand)
+     Do While oExec.Status = 0
+       WScript.Sleep 100
+     Loop
+
+     strCommand = "eventcreate /T Information /ID 107 /L Setup /SO " & Chr(34) & "VCLprepare1.vbs" & _
+                Chr(34) & " /D " & Chr(34) & "VCLprepare1.vbs script finished." & Chr(34)
+     Set oExec = oWshShell.Exec(strcommand)
+     Do While oExec.Status = 0
+       WScript.Sleep 100
+     Loop
+     objTextFile.WriteLine(Now & " : VCLprepare1.vbs : script finished")
+     strCommand = "eventcreate /T Error /ID 111 /L Setup /SO " & Chr(34) & "VCLprepare1.vbs" & _
+             Chr(34) & " /D " & Chr(34) & lcase(sCurrentName) & " : rename ERROR." & Chr(34)
+     Set oExec = oWshShell.Exec(strcommand)
+     Do While oExec.Status = 0
+       WScript.Sleep 100
+     Loop
+     objTextFile.WriteLine(Now & " : VCLprepare1.vbs : " & lcase(sCurrentName) & " : rename ERROR.")
+     objTextFile.WriteLine("========================================================================")
+   End If
+
+ 'close log file handler
+   objTextFile.Close
+
+  ' log-off
+   oWshShell.Run "cmd.exe /C " & "C:\WINDOWS\system32\logoff.exe ", 0, TRUE
+   WScript.Quit
+
+Else
+' computer renamed OK - continue with remaining steps
+   strCommand = "eventcreate /T Information /ID 104 /L Setup /SO " & Chr(34) & "VCLprepare1.vbs" & _
+                Chr(34) & " /D " & Chr(34) & "Computer's name changed successfully." & Chr(34)
+ ' Record result in Setup Event Log
+   Set oExec = oWshShell.Exec(strcommand)
+   Do While oExec.Status = 0
+     WScript.Sleep 100
+   Loop
+   WScript.Echo "Computer's name changed successfully!"
+   objTextFile.WriteLine(Now & " : VCLprepare1.vbs : Computer's name changed successfully")
+
+
+ ' Setup to run step2-setup.vbs script after reboot
+   objTextFile.WriteLine(Now & " : VCLprepare1.vbs : setup RunOnce 'VCLprepare2.vbs' after reboot")
+
+   oWshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\step2", "cmd.exe /c cscript.exe " & sTempDir & "\vcl\VCLprepare2.vbs"
+
+   WScript.Sleep 1000
+
+   check = oWshShell.RegRead("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\step2")
+
+   objTextFile.WriteLine(Now & " : CHECK (RunOnce registry entry): " & check)
+
+
+ ' Assign new unique SID
+   WScript.Echo "Assigning new SID... "
+   objTextFile.WriteLine(Now & " : VCLprepare1.vbs : Assigning new SID using newsid.exe")
+   Set oExec = oWshShell.Exec(sTempDir & "\vcl\newsid.exe /a /d 5")
+   Do While oExec.Status = 0
+     WScript.Sleep 100
+   Loop
+   objTextFile.WriteLine(Now & " : VCLprepare1.vbs : script finished, rebooting computer")
+   objTextFile.WriteLine("========================================================================")
+ 'close log file handler
+   objTextFile.Close
+
+   strCommand = "eventcreate /T Information /ID 107 /L Setup /SO " & Chr(34) & "VCLprepare1.vbs" & _
+                Chr(34) & " /D " & Chr(34) & "VCLprepare1.vbs script finished." & Chr(34)
+   Set oExec = oWshShell.Exec(strcommand)
+   Do While oExec.Status = 0
+     WScript.Sleep 100
+   Loop
+   WScript.Echo "Done!"
+End If
+
+WScript.Quit
+

Propchange: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/VCLprepare1.vbs
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/VCLprepare2.vbs
URL: http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/VCLprepare2.vbs?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/VCLprepare2.vbs (added)
+++ incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/VCLprepare2.vbs Fri Dec 12 10:20:10 2008
@@ -0,0 +1,124 @@
+Set oWshShell = CreateObject("WScript.Shell")
+Set oWshEnvironment = oWshShell.Environment("Process")
+sCurrentName = oWshEnvironment("COMPUTERNAME")
+sTempDir = oWshEnvironment("TEMP")
+'WScript.Echo "COMPUTERNAME = " & sCurrentName
+'WScript.Echo "Temp directory = " & sTempDir
+On Error Resume Next
+Dim oExec
+Const ForAppending = 8
+check = ""
+
+strComputer = "."
+Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
+
+' open log file to record all actions taken
+set objFSO = CreateObject("Scripting.FileSystemObject")
+Set objTextFile = objFSO.OpenTextFile _
+    (sTempDir & "\VCLprepare.log", ForAppending, True)
+objTextFile.WriteLine("========================================================================")
+objTextFile.WriteLine(Now & " : VCLprepare2.vbs : script started")
+
+WScript.Echo "#### This is VCLprepare2.vbs script ####"
+WScript.Echo "Waiting for NTsyslog service..."
+' Wait until NTsyslog service started
+started = 0
+Do While started = 0
+   Set colRunningServices = objWMIService.ExecQuery ("Select * from Win32_Service")
+   For Each objService in colRunningServices 
+      If (objService.DisplayName = "NTsyslog") AND (objService.State = "Running") Then
+         started = 1
+      End If
+   Next
+   WScript.Sleep 100
+Loop
+WScript.Sleep 5000
+WScript.Echo "NTsyslog service is up."
+objTextFile.WriteLine(Now & " : VCLprepare2.vbs : NTsyslog service is up")
+
+' Write what happening along the way to Setup Event Log
+strCommand = "eventcreate /T Information /ID 108 /L Setup /SO " & Chr(34) & "VCLprepare2.vbs" & _
+             Chr(34) & " /D " & Chr(34) & "VCLprepare2.vbs script started." & Chr(34)
+Set oExec = oWshShell.Exec(strcommand)
+Do While oExec.Status = 0
+     WScript.Sleep 100
+Loop
+ 
+' execute one more time to insure it goes to right EventLog
+Set oExec = oWshShell.Exec(strcommand)
+Do While oExec.Status = 0
+     WScript.Sleep 100
+Loop
+
+ 
+' create new "passwd" and "group" files for cygwin, because SID was changed by step1-rename.vbs script
+WScript.Echo "Creating new group and passwd files for cygwin..."
+objTextFile.WriteLine(Now & " : VCLprepare2.vbs : Create new group and passwd files for cygwin")
+oWshShell.Run "cmd.exe /C del " & "c:\cygwin\etc\group", 0, TRUE
+WScript.Sleep 1000
+oWshShell.Run "cmd.exe /C del " & "c:\cygwin\etc\passwd", 0, TRUE
+WScript.Sleep 1000
+oWshShell.Run "cmd.exe /C " & "c:\cygwin\bin\mkgroup.exe -l" & " > c:\cygwin\etc\group", 0, TRUE
+WScript.Sleep 1000
+oWshShell.Run "cmd.exe /C " & "c:\cygwin\bin\mkpasswd.exe -l" & " > c:\cygwin\etc\passwd", 0, TRUE
+WScript.Sleep 1000
+oWshShell.Run "C:\WINDOWS\system32\sc.exe start NSClient", 0, TRUE
+WScript.Sleep 1000
+WScript.Echo "Done!"
+
+strCommand = "eventcreate /T Information /ID 109 /L Setup /SO " & Chr(34) & "VCLprepare2.vbs" & Chr(34) & _
+              " /D " & Chr(34) & "passwd and group files for cygwin were created successfully." & Chr(34)
+' Record result in Setup Event Log
+Set oExec = oWshShell.Exec(strcommand)
+Do While oExec.Status = 0
+     WScript.Sleep 100
+Loop
+objTextFile.WriteLine(Now & " : VCLprepare2.vbs : passwd and group files for cygwin were created successfully")
+
+' Turn off auto-login
+objTextFile.WriteLine(Now & " : VCLprepare2.vbs : disable Auto-Logon")
+oWshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon", "0"
+
+check = oWshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon")
+
+objTextFile.WriteLine(Now & " : CHECK (AutoAdminLogon registry entry): " & check & " (should be 0)")
+
+' Do quick format of volume D:
+Set oExec = oWshShell.Exec("cmd.exe /C echo y | C:\WINDOWS\system32\format.com D: /FS:NTFS /V:Storage /Q ")
+Do While oExec.Status = 0
+     WScript.Sleep 100
+Loop
+
+' if D: drive was NTFS volume before - then just delete everything from it
+Set oExec = oWshShell.Exec("rm -rf D:/* ")
+Do While oExec.Status = 0
+     WScript.Sleep 100
+Loop
+
+strCommand = "eventcreate /T Information /ID 110 /L Setup /SO " & Chr(34) & "VCLprepare2.vbs" & _
+             Chr(34) & " /D " & Chr(34) & "VCLprepare2.vbs script finished." & Chr(34)
+Set oExec = oWshShell.Exec(strcommand)
+Do While oExec.Status = 0
+     WScript.Sleep 100
+Loop
+objTextFile.WriteLine(Now & " : VCLprepare2.vbs : script finished")
+
+'MYNAME=lcase(sCurrentName)
+
+'strCommand = "eventcreate /T Information /ID 111 /L Setup /SO " & Chr(34) & "VCLprepare2.vbs" & _
+'             Chr(34) & " /D " & Chr(34) & MYNAME & " is READY." & Chr(34)
+strCommand = "eventcreate /T Information /ID 111 /L Setup /SO " & Chr(34) & "VCLprepare2.vbs" & _
+             Chr(34) & " /D " & Chr(34) & lcase(sCurrentName) & " is READY." & Chr(34)
+Set oExec = oWshShell.Exec(strcommand)
+Do While oExec.Status = 0
+     WScript.Sleep 100
+Loop
+objTextFile.WriteLine(Now & " : VCLprepare2.vbs : " & lcase(sCurrentName) & " is READY.")
+objTextFile.WriteLine("========================================================================")
+'close log file handler
+objTextFile.Close
+ 
+' Just log-off
+oWshShell.Exec("C:\WINDOWS\system32\logoff.exe")
+
+WScript.Quit

Propchange: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/VCLprepare2.vbs
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/add_user.vbs
URL: http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/add_user.vbs?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/add_user.vbs (added)
+++ incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/add_user.vbs Fri Dec 12 10:20:10 2008
@@ -0,0 +1,35 @@
+Dim UserAccount
+Dim UserPasswd
+ 
+If WScript.Arguments.Count = 2 Then
+   UserAccount = WScript.Arguments.Item(0)
+   UserPasswd = WScript.Arguments.Item(1)
+Else
+   WScript.Echo "Usage: add_user.vbs <user_name> <user_passwd>"
+   WScript.Quit
+End If
+
+strComputer = "."
+Set colAccounts = GetObject("WinNT://" & strComputer & "")
+Set objUser = colAccounts.Create("user", UserAccount)
+objUser.SetPassword UserPasswd
+objUser.SetInfo
+
+Set net = WScript.CreateObject("WScript.Network") 
+local = net.ComputerName 
+set group = GetObject("WinNT://"& local &"/Administrators") 
+set group1 = GetObject("WinNT://"& local &"/Remote Desktop Users") 
+on error resume next 
+group.Add "WinNT://"& UserAccount &""
+group1.Add "WinNT://"& UserAccount &""
+CheckError 
+
+sub CheckError 
+  if not err.number=0 then 
+    WScript.Echo err.Number
+    vbCritical err.clear 
+'  else WScript.Echo "Done!" 
+  end if 
+end sub
+
+WScript.sleep 1000
\ No newline at end of file

Propchange: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/add_user.vbs
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/auto_create_image.vbs
URL: http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/auto_create_image.vbs?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/auto_create_image.vbs (added)
+++ incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/auto_create_image.vbs Fri Dec 12 10:20:10 2008
@@ -0,0 +1,107 @@
+On Error Resume Next
+
+
+Set oWshShell = CreateObject("WScript.Shell")
+
+Set oWshEnvironment = oWshShell.Environment("Process")
+Set oFileSystem = CreateObject("Scripting.FileSystemObject")
+
+sTempDir = oWshEnvironment("TEMP")
+Dim oExec
+Dim GuiAnswer
+strComputer = "."
+Const ForAppending = 8
+
+
+' clean up %TEMP% directory from .log files
+oWshShell.Run "cmd.exe /C del /Q " & sTempDir & "\*.log", 0, TRUE
+
+' open log file to record all actions taken
+set objFSO = CreateObject("Scripting.FileSystemObject")
+Set objTextFile = objFSO.OpenTextFile _
+    (sTempDir & "\VCLprepare.log", ForAppending, True)
+objTextFile.WriteLine("========================================================================")
+objTextFile.WriteLine(Now & " : auto_create_image.vbs : script started")
+
+objTextFile.WriteLine(Now & " : auto_create_image.vbs : cleaned up " & sTempDir & " directory from .log files")
+
+' Precaution: ask user for final approval
+host_name = Wscript.FullName
+'WScript.Echo "full name : " & host_name
+base_name = oFileSystem.GetBaseName(host_name)
+'WScript.Echo "base name : " & base_name
+
+
+
+' check that WAN network interface is enabled, if not - enable it
+WScript.Echo "Enabling WAN interface..."
+objTextFile.WriteLine(Now & " : auto_create_image.vbs : Enable WAN interface")
+oWshShell.Run "cscript.exe " & sTempDir & "\vcl\enWAN.vbs", 0, TRUE
+WScript.Echo "Done!"
+objTextFile.WriteLine(Now & " : auto_create_image.vbs : WAN interface enabled")
+
+
+' setup to run prepare_for_image.vbs script after reboot
+objTextFile.WriteLine(Now & " : auto_create_image.vbs : setup RunOnce 'prepare_for_image.vbs' after reboot")
+oWshShell.RegWrite "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\step0", "cmd.exe /c cscript.exe " & sTempDir & "\vcl\auto_prepare_for_image.vbs"
+
+
+check = oWshShell.RegRead("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\step0")
+
+objTextFile.WriteLine(Now & " : CHECK (RunOnce registry entry): " & check)
+
+' enable AutoLogon after reboot
+objTextFile.WriteLine(Now & " : auto_create_image.vbs : enable Auto-Logon after reboot")
+oWshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon", "1"
+
+
+check = oWshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon")
+
+objTextFile.WriteLine(Now & " : CHECK (AutoAdminLogon registry entry): " & check & " (should be 1)")
+
+
+' disable pagefile
+objTextFile.WriteLine(Now & " : auto_create_image.vbs : disable page file")
+strCommand = "reg.exe add " & Chr(34) & _
+  "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" & Chr(34) &_
+  " /v PagingFiles /d " & Chr(34) & "" & Chr(34) & " /t REG_MULTI_SZ /f"
+Set oExec = oWshShell.Exec(strcommand)
+Do While oExec.Status = 0
+   WScript.Sleep 100
+Loop
+strCommand = sTempDir & "\vcl\movefile.exe " & Chr(34) & "c:\pagefile.sys" & Chr(34) & " " & Chr(34) & Chr(34)
+Set oExec = oWshShell.Exec(strcommand)
+Do While oExec.Status = 0
+   WScript.Sleep 100
+Loop
+
+
+'check = oWshShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PagingFiles")
+
+'objTextFile.WriteLine(Now & " : CHECK (PagingFiles registry entry): '" & check(0) & "' (should be empty)")
+
+
+objTextFile.WriteLine(Now & " : auto_create_image.vbs : script finished, rebooting computer")
+objTextFile.WriteLine("========================================================================")
+'close log file handler
+objTextFile.Close
+
+
+'reboot computer to make changes effective
+
+Set objWMIService = GetObject("winmgmts:" _
+    & "{impersonationLevel=impersonate,(Shutdown)}!\\" & _ 
+      strComputer & "\root\cimv2")
+Set colOperatingSystems = objWMIService.ExecQuery _
+    ("Select * from Win32_OperatingSystem")
+for Each objOperatingSystem in colOperatingSystems
+    intreturn = ObjOperatingSystem.Reboot()
+    if intreturn = 0 Then
+      WScript.echo "createimage reboot"
+    Else
+      Wscript.echo "reboot failed error code " & intreturn
+    End If 
+Next
+
+WScript.Quit
+

Propchange: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/auto_create_image.vbs
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/auto_prepare_for_image.vbs
URL: http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/auto_prepare_for_image.vbs?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/auto_prepare_for_image.vbs (added)
+++ incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/auto_prepare_for_image.vbs Fri Dec 12 10:20:10 2008
@@ -0,0 +1,73 @@
+On Error Resume Next
+Set oWshShell = CreateObject("WScript.Shell")
+
+Set oWshEnvironment = oWshShell.Environment("Process")
+
+sCurrentName = oWshEnvironment("COMPUTERNAME")
+sTempDir = oWshEnvironment("TEMP")
+Const ForAppending = 8
+Dim oExec
+MYNAME=lcase(sCurrentName)
+check = ""
+
+' open log file to record all actions taken
+set objFSO = CreateObject("Scripting.FileSystemObject")
+Set objTextFile = objFSO.OpenTextFile _
+    (sTempDir & "\VCLprepare.log", ForAppending, True)
+objTextFile.WriteLine("========================================================================")
+objTextFile.WriteLine(Now & " : auto_prepare_for_image.vbs : script started")
+
+
+' setup to run VCLprepare.vbs script after reboot
+objTextFile.WriteLine(Now & " : auto_prepare_for_image.vbs : setup RunOnce 'VCLprepare1.vbs' after reboot")
+oWshShell.RegWrite "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\step1", "cmd.exe /c cscript.exe " & sTempDir & "\vcl\VCLprepare1.vbs"
+
+
+check = oWshShell.RegRead("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\step1")
+
+objTextFile.WriteLine(Now & " : CHECK (RunOnce registry entry): " & check)
+
+' enable AutoLogon after reboot
+objTextFile.WriteLine(Now & " : auto_prepare_for_image.vbs : enable Auto-Logon after reboot")
+oWshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon", "1"
+
+
+check = oWshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon")
+
+objTextFile.WriteLine(Now & " : CHECK (AutoAdminLogon registry entry): " & check & " (should be 1)")
+
+
+'Clear up default Event Logs
+strComputer = "."
+Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
+        strComputer & "\root\cimv2")
+Set colLogFiles = objWMIService.ExecQuery("Select * from Win32_NTEventLogFile")
+For Each objLogfile in colLogFiles
+    objLogFile.ClearEventLog()
+Next
+
+
+' ask to setup "image" mode for computer on management node
+objTextFile.WriteLine(Now & " : auto_prepare_for_image.vbs : setup 'image' mode for computer on management node")
+
+ 
+
+objTextFile.WriteLine(Now & " : auto_prepare_for_image.vbs : script finished, management reboot computer")
+objTextFile.WriteLine("========================================================================")
+'close log file handler
+objTextFile.Close
+
+''reboot computer to make changes effective
+'' above we are telling the management node to reboot by writing to log file. 
+'' no need for the below reboot code
+
+'Set objWMIService = GetObject("winmgmts:" _
+'    & "{impersonationLevel=impersonate,(Shutdown)}!\\" & strComputer & "\root\cimv2")
+'Set colOperatingSystems = objWMIService.ExecQuery _
+'    ("Select * from Win32_OperatingSystem")
+'For Each objOperatingSystem in colOperatingSystems
+'    ObjOperatingSystem.Reboot()
+'Next
+
+WScript.Quit
+

Propchange: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/auto_prepare_for_image.vbs
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/create_image.vbs
URL: http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/create_image.vbs?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/create_image.vbs (added)
+++ incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/create_image.vbs Fri Dec 12 10:20:10 2008
@@ -0,0 +1,131 @@
+On Error Resume Next
+
+
+Set oWshShell = CreateObject("WScript.Shell")
+
+Set oWshEnvironment = oWshShell.Environment("Process")
+Set oFileSystem = CreateObject("Scripting.FileSystemObject")
+
+sTempDir = oWshEnvironment("TEMP")
+Dim oExec
+Dim GuiAnswer
+strComputer = "."
+Const ForAppending = 8
+
+
+' clean up %TEMP% directory from .log files
+oWshShell.Run "cmd.exe /C del /Q " & sTempDir & "\*.log", 0, TRUE
+
+' open log file to record all actions taken
+set objFSO = CreateObject("Scripting.FileSystemObject")
+Set objTextFile = objFSO.OpenTextFile _
+    (sTempDir & "\VCLprepare.log", ForAppending, True)
+objTextFile.WriteLine("========================================================================")
+objTextFile.WriteLine(Now & " : create_image.vbs : script started")
+
+objTextFile.WriteLine(Now & " : create_image.vbs : cleaned up " & sTempDir & " directory from .log files")
+
+' Precaution: ask user for final approval
+host_name = Wscript.FullName
+'WScript.Echo "full name : " & host_name
+base_name = oFileSystem.GetBaseName(host_name)
+'WScript.Echo "base name : " & base_name
+
+' How was I called?
+If base_name = "cscript" Then
+' from command line
+   objTextFile.WriteLine(Now & " : create_image.vbs : script was called from command line")
+   WScript.StdOut.WriteLine "##############################"
+   WScript.StdOut.WriteLine "### Ready to create image! ###"
+   WScript.StdOut.WriteLine "### Are you sure? (y or n) ###"
+   WScript.StdOut.WriteLine "##############################"
+   answer = WScript.StdIn.ReadLine
+Else 
+' by double-click from Explorer
+   objTextFile.WriteLine(Now & " : create_image.vbs : script was called by double-click from Explorer")
+   If base_name = "WScript" Then
+      GuiAnswer = oWshShell.Popup("Are you sure?",,"Ready to create image!", 4 + 32)
+      Select Case GuiAnswer
+         case 6      answer = "y"
+         case 7      answer = "n"
+'         case -1     WScript.Echo "Is there anybody out there?"
+      End Select
+   End If
+End IF
+
+If Not answer = "y" Then
+   WScript.Echo "Well, maybe some other time! ;-)"
+   objTextFile.WriteLine(Now & " : create_image.vbs : script aborted by user request")
+   objTextFile.WriteLine("========================================================================")
+   WScript.Quit
+End If
+
+
+' check that WAN network interface is enabled, if not - enable it
+WScript.Echo "Enabling WAN interface..."
+objTextFile.WriteLine(Now & " : create_image.vbs : Enable WAN interface")
+oWshShell.Run "cscript.exe " & sTempDir & "\vcl\enWAN.vbs", 0, TRUE
+WScript.Echo "Done!"
+objTextFile.WriteLine(Now & " : create_image.vbs : WAN interface enabled")
+
+
+
+
+' setup to run prepare_for_image.vbs script after reboot
+objTextFile.WriteLine(Now & " : create_image.vbs : setup RunOnce 'prepare_for_image.vbs' after reboot")
+oWshShell.RegWrite "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\step0", "cmd.exe /c cscript.exe " & sTempDir & "\vcl\prepare_for_image.vbs"
+
+
+check = oWshShell.RegRead("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\step0")
+
+objTextFile.WriteLine(Now & " : CHECK (RunOnce registry entry): " & check)
+
+' enable AutoLogon after reboot
+objTextFile.WriteLine(Now & " : create_image.vbs : enable Auto-Logon after reboot")
+oWshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon", "1"
+
+
+check = oWshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon")
+
+objTextFile.WriteLine(Now & " : CHECK (AutoAdminLogon registry entry): " & check & " (should be 1)")
+
+
+' disable pagefile
+objTextFile.WriteLine(Now & " : create_image.vbs : disable page file")
+strCommand = "reg.exe add " & Chr(34) & _
+  "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" & Chr(34) &_
+  " /v PagingFiles /d " & Chr(34) & "" & Chr(34) & " /t REG_MULTI_SZ /f"
+Set oExec = oWshShell.Exec(strcommand)
+Do While oExec.Status = 0
+   WScript.Sleep 100
+Loop
+strCommand = sTempDir & "\vcl\movefile.exe " & Chr(34) & "c:\pagefile.sys" & Chr(34) & " " & Chr(34) & Chr(34)
+Set oExec = oWshShell.Exec(strcommand)
+Do While oExec.Status = 0
+   WScript.Sleep 100
+Loop
+
+
+'check = oWshShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PagingFiles")
+
+'objTextFile.WriteLine(Now & " : CHECK (PagingFiles registry entry): '" & check(0) & "' (should be empty)")
+
+
+objTextFile.WriteLine(Now & " : create_image.vbs : script finished, rebooting computer")
+objTextFile.WriteLine("========================================================================")
+'close log file handler
+objTextFile.Close
+
+
+'reboot computer to make changes effective
+
+Set objWMIService = GetObject("winmgmts:" _
+    & "{impersonationLevel=impersonate,(Shutdown)}!\\" & strComputer & "\root\cimv2")
+Set colOperatingSystems = objWMIService.ExecQuery _
+    ("Select * from Win32_OperatingSystem")
+For Each objOperatingSystem in colOperatingSystems
+    ObjOperatingSystem.Reboot()
+Next
+
+WScript.Quit
+

Propchange: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/create_image.vbs
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/del_user.vbs
URL: http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/del_user.vbs?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/del_user.vbs (added)
+++ incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/del_user.vbs Fri Dec 12 10:20:10 2008
@@ -0,0 +1,14 @@
+Dim UserAccount
+ 
+If WScript.Arguments.Count = 1 Then
+   UserAccount = WScript.Arguments.Item(0)
+Else
+   WScript.Echo "Usage: del_user.vbs <user_name>"
+   WScript.Quit
+End If
+
+strComputer = "."
+Set objComputer = GetObject("WinNT://" & strComputer & ",computer")
+objComputer.Delete "user", UserAccount
+
+WScript.sleep 1000
\ No newline at end of file

Propchange: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/del_user.vbs
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/disWAN.vbs
URL: http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/disWAN.vbs?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/disWAN.vbs (added)
+++ incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/disWAN.vbs Fri Dec 12 10:20:10 2008
@@ -0,0 +1,106 @@
+Set oWshShell = CreateObject("WScript.Shell")
+Set oWshEnvironment = oWshShell.Environment("Process")
+sTempDir = oWshEnvironment("TEMP")
+Const ForReading = 1
+
+set fso = CreateObject("Scripting.FileSystemObject")
+
+If fso.FileExists(sTempDir & "\WANname.txt") Then
+  set results = fso.GetFile(sTempDir & "\WANname.txt")
+  set ts = results.OpenAsTextStream(ForReading)
+  do while ts.AtEndOfStream <> True
+	retString = ts.ReadLine
+  loop
+  ts.Close
+  sConnectionName = retString
+Else
+  WScript.Echo "File '" & sTempDir & "\WANname.txt" & "' does NOT exists!"
+  WScript.Echo "Cannot continue! Quitting..."
+  WScript.Quit
+End If
+
+Const ssfCONTROLS = 3
+
+WScript.Echo "Disabling '" & sConnectionName & "' (WAN) connection..."
+
+sEnableVerb = "En&able"
+sDisableVerb = "Disa&ble"
+
+set shellApp = createobject("shell.application")
+set oControlPanel = shellApp.Namespace(ssfCONTROLS)
+'Wscript.Echo "oControlPanel: " & oControlPanel
+
+set oNetConnections = nothing
+for each folderitem in oControlPanel.items
+'  if folderitem.name  = "Network and Dial-up Connections" then
+  if folderitem.name  = "Network Connections" then
+    set oNetConnections = folderitem.getfolder: exit for
+  end if
+next
+
+if oNetConnections is nothing then
+'  msgbox "Couldn't find 'Network and Dial-up Connections' folder"
+  msgbox "Couldn't find 'Network Connections' folder"
+  wscript.quit
+end if
+
+set oLanConnection = nothing
+for each folderitem in oNetConnections.items
+  if lcase(folderitem.name)  = lcase(sConnectionName) then
+    set oLanConnection = folderitem: exit for
+  end if
+next
+
+if oLanConnection is nothing then
+  msgbox "Couldn't find '" & sConnectionName & "' item"
+  wscript.quit
+end if
+
+bEnabled = true
+set oEnableVerb = nothing
+set oDisableVerb = nothing
+s = "Verbs: " & vbcrlf
+for each verb in oLanConnection.verbs
+  s = s & vbcrlf & verb.name
+  if verb.name = sEnableVerb then 
+    set oEnableVerb = verb  
+    bEnabled = false
+  end if
+  if verb.name = sDisableVerb then 
+    set oDisableVerb = verb  
+  end if
+next
+
+
+
+'debugging displays left just in case...
+'
+'msgbox s ': wscript.quit
+'msgbox "Enabled: " & bEnabled ': wscript.quit
+
+'not sure why, but invokeverb always seemed to work 
+'for enable but not disable.  
+'
+'saving a reference to the appropriate verb object 
+'and calling the DoIt method always seems to work.
+'
+
+if bEnabled then
+'  oLanConnection.invokeverb sDisableVerb
+   oDisableVerb.DoIt
+   wscript.sleep 5000
+   wScript.Echo "Done!"
+'   Wscript.Echo sConnectionName & " disabled!"
+else
+'  oLanConnection.invokeverb sEnableVerb
+   Wscript.Echo "'" & sConnectionName & "' already disabled!"
+'  oEnableVerb.DoIt
+end if
+
+'adjust the sleep duration below as needed...
+'
+'if you let the oLanConnection go out of scope
+'and be destroyed too soon, the action of the verb
+'may not take...
+'
+'wscript.sleep 5000 

Propchange: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/disWAN.vbs
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/enWAN.vbs
URL: http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/enWAN.vbs?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/enWAN.vbs (added)
+++ incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/enWAN.vbs Fri Dec 12 10:20:10 2008
@@ -0,0 +1,108 @@
+Set oWshShell = CreateObject("WScript.Shell")
+Set oWshEnvironment = oWshShell.Environment("Process")
+sTempDir = oWshEnvironment("TEMP")
+Const ForReading = 1
+
+set fso = CreateObject("Scripting.FileSystemObject")
+
+If fso.FileExists(sTempDir & "\WANname.txt") Then
+  set results = fso.GetFile(sTempDir & "\WANname.txt")
+  set ts = results.OpenAsTextStream(ForReading)
+  do while ts.AtEndOfStream <> True
+	retString = ts.ReadLine
+  loop
+  ts.Close
+  sConnectionName = retString
+Else
+  WScript.Echo "File '" & sTempDir & "\WANname.txt" & "' does NOT exists!"
+  WScript.Echo "Cannot continue! Quitting..."
+  WScript.Quit
+End If
+
+Const ssfCONTROLS = 3
+
+WScript.Echo "Enabling '" & sConnectionName & "' (WAN) connection..."
+
+sEnableVerb = "En&able"
+sDisableVerb = "Disa&ble"
+
+set shellApp = createobject("shell.application")
+set oControlPanel = shellApp.Namespace(ssfCONTROLS)
+'Wscript.Echo "oControlPanel: " & oControlPanel
+
+set oNetConnections = nothing
+for each folderitem in oControlPanel.items
+'  if folderitem.name  = "Network and Dial-up Connections" then
+  if folderitem.name  = "Network Connections" then
+    set oNetConnections = folderitem.getfolder: exit for
+  end if
+next
+
+if oNetConnections is nothing then
+'  msgbox "Couldn't find 'Network and Dial-up Connections' folder"
+  msgbox "Couldn't find 'Network Connections' folder"
+  wscript.quit
+end if
+
+set oLanConnection = nothing
+for each folderitem in oNetConnections.items
+  if lcase(folderitem.name)  = lcase(sConnectionName) then
+    set oLanConnection = folderitem: exit for
+  end if
+next
+
+if oLanConnection is nothing then
+  msgbox "Couldn't find '" & sConnectionName & "' item"
+  wscript.quit
+end if
+
+
+bEnabled = true
+set oEnableVerb = nothing
+set oDisableVerb = nothing
+s = "Verbs: " & vbcrlf
+for each verb in oLanConnection.verbs
+  s = s & vbcrlf & verb.name
+  if verb.name = sEnableVerb then 
+    set oEnableVerb = verb  
+    bEnabled = false
+  end if
+  if verb.name = sDisableVerb then 
+    set oDisableVerb = verb  
+  end if
+next
+
+
+
+'debugging displays left just in case...
+'
+'msgbox s ': wscript.quit
+'msgbox "Enabled: " & bEnabled ': wscript.quit
+
+'not sure why, but invokeverb always seemed to work 
+'for enable but not disable.  
+'
+'saving a reference to the appropriate verb object 
+'and calling the DoIt method always seems to work.
+'
+
+if bEnabled then
+'  oLanConnection.invokeverb sDisableVerb
+   Wscript.Echo "'" & sConnectionName & "' already enabled!"
+'  oDisableVerb.DoIt
+else
+'  oLanConnection.invokeverb sEnableVerb
+   oEnableVerb.DoIt
+   wscript.sleep 5000 
+   WScript.Echo "Done!"
+'   Wscript.Echo sConnectionName & " enabled!"
+end if
+
+
+'adjust the sleep duration below as needed...
+'
+'if you let the oLanConnection go out of scope
+'and be destroyed too soon, the action of the verb
+'may not take...
+'
+'wscript.sleep 5000 

Propchange: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/enWAN.vbs
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/list_users.vbs
URL: http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/list_users.vbs?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/list_users.vbs (added)
+++ incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/list_users.vbs Fri Dec 12 10:20:10 2008
@@ -0,0 +1,7 @@
+Set objNetwork = CreateObject("Wscript.Network")
+strComputer = objNetwork.ComputerName
+Set colAccounts = GetObject("WinNT://" & strComputer & "")
+colAccounts.Filter = Array("user")
+For Each objUser In colAccounts
+    Wscript.Echo objUser.Name
+Next
\ No newline at end of file

Propchange: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/list_users.vbs
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/prepare_for_image.vbs
URL: http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/prepare_for_image.vbs?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/prepare_for_image.vbs (added)
+++ incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/prepare_for_image.vbs Fri Dec 12 10:20:10 2008
@@ -0,0 +1,84 @@
+On Error Resume Next
+Set oWshShell = CreateObject("WScript.Shell")
+
+Set oWshEnvironment = oWshShell.Environment("Process")
+
+sCurrentName = oWshEnvironment("COMPUTERNAME")
+sTempDir = oWshEnvironment("TEMP")
+Const ForAppending = 8
+Dim oExec
+MYNAME=lcase(sCurrentName)
+check = ""
+
+' open log file to record all actions taken
+set objFSO = CreateObject("Scripting.FileSystemObject")
+Set objTextFile = objFSO.OpenTextFile _
+    (sTempDir & "\VCLprepare.log", ForAppending, True)
+objTextFile.WriteLine("========================================================================")
+objTextFile.WriteLine(Now & " : prepare_for_image.vbs : script started")
+
+
+' setup to run VCLprepare.vbs script after reboot
+objTextFile.WriteLine(Now & " : prepare_for_image.vbs : setup RunOnce 'VCLprepare1.vbs' after reboot")
+oWshShell.RegWrite "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\step1", "cmd.exe /c cscript.exe " & sTempDir & "\vcl\VCLprepare1.vbs"
+
+
+check = oWshShell.RegRead("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\step1")
+
+objTextFile.WriteLine(Now & " : CHECK (RunOnce registry entry): " & check)
+
+' enable AutoLogon after reboot
+objTextFile.WriteLine(Now & " : create_image.vbs : enable Auto-Logon after reboot")
+oWshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon", "1"
+
+
+check = oWshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon")
+
+objTextFile.WriteLine(Now & " : CHECK (AutoAdminLogon registry entry): " & check & " (should be 1)")
+
+
+'Clear up default Event Logs
+strComputer = "."
+Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
+        strComputer & "\root\cimv2")
+Set colLogFiles = objWMIService.ExecQuery("Select * from Win32_NTEventLogFile")
+For Each objLogfile in colLogFiles
+    objLogFile.ClearEventLog()
+Next
+
+
+' ask to setup "image" mode for computer on management node
+objTextFile.WriteLine(Now & " : prepare_for_image.vbs : setup 'image' mode for computer on management node")
+
+WScript.StdOut.WriteLine "######################################"
+'WScript.StdOut.WriteLine "### Setup 'image' mode for vlca1-5 ###"
+WScript.StdOut.WriteLine "### Setup 'image' mode for " & MYNAME & " ###"
+WScript.StdOut.WriteLine "### on management node             ###"
+WScript.StdOut.WriteLine "###     Is it ready?  (y or n)     ###"
+WScript.StdOut.WriteLine "######################################"
+answer = WScript.StdIn.ReadLine
+
+If Not answer = "y" Then
+   objTextFile.WriteLine(Now & " : prepare_for_image.vbs : script aborted by user request")
+   objTextFile.WriteLine("========================================================================")
+   WScript.Quit
+End If
+
+
+objTextFile.WriteLine(Now & " : prepare_for_image.vbs : script finished, rebooting computer")
+objTextFile.WriteLine("========================================================================")
+'close log file handler
+objTextFile.Close
+
+'reboot computer to make changes effective
+
+Set objWMIService = GetObject("winmgmts:" _
+    & "{impersonationLevel=impersonate,(Shutdown)}!\\" & strComputer & "\root\cimv2")
+Set colOperatingSystems = objWMIService.ExecQuery _
+    ("Select * from Win32_OperatingSystem")
+For Each objOperatingSystem in colOperatingSystems
+    ObjOperatingSystem.Reboot()
+Next
+
+WScript.Quit
+

Propchange: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/prepare_for_image.vbs
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/reboot.vbs
URL: http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/reboot.vbs?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/reboot.vbs (added)
+++ incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/reboot.vbs Fri Dec 12 10:20:10 2008
@@ -0,0 +1,28 @@
+On Error Resume Next
+Set oWshShell = CreateObject("WScript.Shell")
+Set oWshEnvironment = oWshShell.Environment("Process")
+sCurrentName = oWshEnvironment("COMPUTERNAME")
+Const ForAppending = 8
+Dim oExec
+MYNAME=lcase(sCurrentName)
+check = ""
+
+strComputer = "."
+Set objWMIService = GetObject("winmgmts:" _
+    & "{impersonationLevel=impersonate,(Shutdown)}!\\" & _ 
+      strComputer & "\root\cimv2")
+Set colOperatingSystems = objWMIService.ExecQuery _
+    ("Select * from Win32_OperatingSystem")
+for Each objOperatingSystem in colOperatingSystems
+    intret = ObjOperatingSystem.Reboot()
+    If intret = 0 Then
+         Wscript.echo "Computer rebooted"
+    Else
+         Wscript.echo "reboot failed error code " & intret
+    End If
+Next
+
+Set ObjOperatingSystem = Nothing
+Set colOperatingSystems = Nothing
+Set objWMIService = Nothing
+WScript.Quit

Propchange: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/reboot.vbs
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/release_computer_vcl
URL: http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/release_computer_vcl?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/release_computer_vcl (added)
+++ incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/release_computer_vcl Fri Dec 12 10:20:10 2008
@@ -0,0 +1,274 @@
+#! /bin/sh
+if [ "$#" -lt 2 ]
+then
+  echo "Not enough parameters!"
+  echo "Usage: ./release_computer <machine_name> <user_name>"
+  echo "     example: ./release_computer vcla1-7 guest"
+  exit 0
+fi
+
+name=$1
+len=`expr length $name`
+pos=`expr index "$name" -`
+num=${name:$pos:$len}
+num=`expr $num + 20`
+wanip=152.1.14.$num
+
+if [ $2 == "root" ]
+then
+   echo -e "\nERROR: CANNOT DELETE USER 'root'!!!"
+   echo -e "Nothing can be done! Exit.\n"
+   exit 1
+fi
+
+echo -e "\nWorking...."
+
+# check if <machine_name> is valid
+if [ -z "`nodels | grep -w $1`" ]
+then
+   echo -e "\nERROR : '$1' - there is no such machine!"
+   echo -e "Nothing can be done! Exit.\n"
+   exit 1
+else
+   echo "Check: Machine '$1' exists. Good!"
+fi
+
+# check if machine is ON
+if [ "`rpower $1 stat | grep -w on`" ]
+then
+   echo "Check: Machine '$1' is ON. Good!"
+else
+   if [ "`rpower $1 stat | grep -w off`" ]
+   then
+      echo -e "\nERROR: Machine '$1' is OFF!"
+   else
+      echo -e "\nERROR: Cannot determine whether '$1' is ON or OFF!"
+      echo "ERROR INFO: (result of 'rpower $1 stat'): `rpower $1 stat`"
+   fi
+   echo -e "Nothing can be done! Exit.\n"
+   exit 1
+fi
+
+# check if machine IS on local network
+if [ "`pping $1 | grep -w noping`" ]
+then
+   echo -e "\nERROR: Machine '$1' is NOT on local network!"
+   echo "ERROR INFO: (result of 'pping $1'): `pping $1`"
+   echo -e "Nothing can be done! Exit.\n"
+   exit 1
+else
+   echo "Check: Machine '$1' IS on local network. Good!"
+fi
+
+# check if machine is available
+# i.e. NOT in the middle of something (like creating image, re-loading OS, etc.)
+
+case $( nodeset $1 stat | gawk 'split($0, a, " ") {print a[2]}' ) in
+install )
+   echo -e "\nERROR: Machine '$1' is in the moddle of re-loading OS!"
+   echo "ERROR INFO: (result of 'nodeset $1 stat'): `nodeset $1 stat`"
+   echo "Please try again later."
+   echo -e "Exit. Nothing was done!\n"
+   exit 1
+   ;;
+image )
+   echo -e "\nERROR: Machine '$1' is in the moddle of creating image of OS!"
+   echo "ERROR INFO: (result of 'nodeset $1 stat'): `nodeset $1 stat`"
+   echo "Please try again later."
+   echo -e "Exit. Nothing was done!\n"
+   exit 1
+   ;;
+boot )
+   echo "Check: Machine '$1' is available. Good!" ;;
+* )
+   echo -e "\nERROR: Machine '$1' is in UKNOWN state!"
+   echo "ERROR INFO: (result of 'nodeset $1 stat'): `nodeset $1 stat`"
+   echo -e "Nothing can be done! Exit.\n"
+   exit 1
+   ;;
+esac
+
+# check if machine is accessible
+if [ -z "`psh $1 uname -r`" ]
+then
+   echo -e "\nERROR: Machine '$1' is NOT accessible!"
+   echo "ERROR INFO: possibly SSH deamon is NOT running on '$1'"
+   echo -e "Nothing can be done! Exit.\n"
+   exit 1
+else
+   echo "Check: Machine '$1' is accessible. Good!"
+fi
+
+# determine what OS
+os=`ssh $1 uname -s`
+if [ $os == "CYGWIN_NT-5.1" ]
+then
+   os="WinXP"
+fi
+if [ $os == "CYGWIN_NT-5.2" ]
+then
+   os="Win2003"
+fi
+ver=`ssh $1 uname -r`
+
+case $os in
+Linux )
+   echo "Check: Machine '$1' is Linux machine ($ver). Good!" ;;
+WinXP )
+   echo "Check: Machine '$1' is WindowsXP machine. Ok." ;;
+Win2003 )
+   echo "Check: Machine '$1' is Windows2003 machine. Ok." ;;
+*     )
+   echo "ERROR: Cannot determine OS of '$1'!"
+   echo "ERROR INFO: (result of 'ssh $1 uname -s'): `ssh $1 uname -s`"
+   exit 1
+   ;;
+esac
+
+#if [ $os == "Linux" ]
+#then
+#   echo -e "\nThis script temporarily works only with Windows machines. Sorry!"
+#   echo -e "Exit. Nothing was done!\n"
+#   exit 0
+#fi
+
+# check if <user_name> actually exists on this machine
+if [[ $os == "Win2003" || $os == "WinXP" ]]
+then
+   if [ -z "`ssh $1 ls | grep -w list_users.vbs`" ]
+   then
+      echo -e "\nERROR: missing script: 'list_users.vbs'"
+      echo "ERROR: cannot continue! Exit."
+      exit 1
+   fi
+fi
+
+user_already_exists="yes"
+if [[ $os == "Win2003" || $os == "WinXP" ]]
+then
+# Windows
+   if [ -z "`ssh $1 cscript.exe //Nologo list_users.vbs | grep -w $2`" ]
+   then
+      user_already_exists="no"
+   fi
+else
+# Linux
+   if [ -z "`ssh $1 cat /etc/passwd | grep -w $2`" ]
+   then
+      user_already_exists="no"
+   fi
+fi
+# delete user if exists
+if [ $user_already_exists == "no" ]
+then
+   echo -e "\nWARNING: user '$2' does NOT exists on $1 !"
+   echo "Do you want just disable WAN network interface? (y or n)"
+   read ans
+   if [ $ans != "y" ]
+   then
+      echo -e "Exit. Nothing was done!\n"
+      exit 0
+   fi
+else
+   if [[ $os == "Win2003" || $os == "WinXP" ]]
+   then
+# Windows
+      ssh $1 cscript.exe //Nologo del_user.vbs $2 $3
+   else
+# Linux
+      ssh $1 "userdel $2" > /dev/null
+   fi
+fi
+
+# check if <user_name> DOES NOT exists NOW on this machine
+user_now_exists="no"
+if [[ $os == "Win2003" || $os == "WinXP" ]]
+then
+# Windows
+   if [ -n "`ssh $1 cscript.exe //Nologo list_users.vbs | grep -w $2`" ]
+   then
+      user_now_exists="yes"
+   fi
+else
+# Linux
+   if [ -n "`ssh $1 cat /etc/passwd | grep -w $2`" ]
+   then
+      user_now_exists="yes"
+   fi
+fi
+if [ $user_now_exists == "no" ]
+then
+   echo "Check: User '$2' does NOT exist now. Good!"
+else
+   echo -e "\nERROR: Could NOT delete user '$2'!"
+#   echo "ERROR INFO: check 'del_user.vbs' script."
+   echo -e "\n Cannot continue! Exit.\n"
+   exit 1
+fi
+
+# Disable WAN interface
+#echo -n "Disabling WAN interface..."
+if [[ $os == "Win2003" || $os == "WinXP" ]]
+then
+# Windows
+   if [ -z "`ssh $1 ls | grep -w disWAN.vbs`" ]
+   then
+      echo -e "\nERROR: Missing script: 'disWAN.vbs'"
+      echo "ERROR: Cannot continue! Exit."
+      exit 1
+   fi
+   ssh $1 cscript.exe //Nologo disWAN.vbs
+else
+# Linux
+   if [ -z "`ssh $1 ifconfig | grep -w $wanip`" ]
+   then
+      echo "WAN is already disabled!"
+   else
+      touch ifcfg-eth1.tmp
+      for ln in `ssh $1 cat /etc/sysconfig/network-scripts/ifcfg-eth1`
+      do
+         if [ -n "`echo $ln | grep -w ONBOOT`" ]
+         then
+            echo "ONBOOT=no" >> ifcfg-eth1.tmp
+         else
+            echo $ln >> ifcfg-eth1.tmp
+         fi
+      done
+      scp -q ifcfg-eth1.tmp $1:/etc/sysconfig/network-scripts/ifcfg-eth1 > /dev/null
+      psh $1 "service network restart" > /dev/null
+      rm -f ifcfg-eth1.tmp
+   fi
+fi
+#echo ""
+
+# check if WAN was actually disabled
+if [[ $os == "Win2003" || $os == "WinXP" ]]
+then
+   if [ -n "`ssh $1 ipconfig | grep -w $wanip`" ]
+   then
+      echo -e "\nERROR: Can still ping WAN interface ($wanip)!"
+      echo -e "ERROR: Cannot continue! Exit.\n"
+      exit 1
+   fi
+fi
+if [ $os == "Linux" ]
+then
+   if [ -n "`ssh $1 ifconfig | grep -w $wanip`" ]
+   then
+      echo -e "\nERROR: Can still ping WAN interface ($wanip)!"
+      echo -e "ERROR: Cannot continue! Exit.\n"
+      exit 1
+   fi
+fi
+
+echo -e "Check: WAN interface is disabled now. Good!\n"
+
+
+if [ -z $ans ]
+then
+   echo -e "\n User '$2' was DELETED on machine '$1'."
+fi
+echo " Machine '$1' is OFF-LINE now."
+echo " Thank you!"
+echo ""
+

Propchange: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/release_computer_vcl
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/reserve_computer_vcl
URL: http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/reserve_computer_vcl?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/reserve_computer_vcl (added)
+++ incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/reserve_computer_vcl Fri Dec 12 10:20:10 2008
@@ -0,0 +1,275 @@
+#! /bin/sh
+if [ "$#" -lt 3 ]
+then
+  echo "Not enough parameters!"
+  echo "Usage: ./reserve_computer <machine_name> <user_name> <user_password>"
+  echo "     example: ./reserve_computer vcla1-7 guest RT56ij"
+  exit 0
+fi
+
+name=$1
+len=`expr length $name`
+pos=`expr index "$name" -`
+num=${name:$pos:$len}
+num=`expr $num + 20`
+wanip=152.1.14.$num
+
+echo -e "\nWorking...."
+
+# check if <machine_name> is valid
+if [ -z "`nodels | grep -w $1`" ]
+then
+   echo -e "\nERROR : '$1' - there is no such machine!"
+   echo -e "Nothing can be done! Exit.\n"
+   exit 1
+else
+   echo "Check: Machine '$1' exists. Good!"
+fi
+
+# check if machine is ON
+if [ "`rpower $1 stat | grep -w on`" ]
+then
+   echo "Check: Machine '$1' is ON. Good!"
+else
+   if [ "`rpower $1 stat | grep -w off`" ]
+   then
+      echo -e "\nERROR: Machine '$1' is OFF!"
+   else
+      echo -e "\nERROR: Cannot determine whether '$1' is ON or OFF!"
+      echo "ERROR INFO: (result of 'rpower $1 stat'): `rpower $1 stat`"
+   fi
+   echo -e "Nothing can be done! Exit.\n"
+   exit 1
+fi
+
+# check if machine IS on local network
+if [ "`pping $1 | grep -w noping`" ]
+then
+   echo -e "\nERROR: Machine '$1' is NOT on local network!"
+   echo "ERROR INFO: (result of 'pping $1'): `pping $1`"
+   echo -e "Nothing can be done! Exit.\n"
+   exit 1
+else
+   echo "Check: Machine '$1' IS on local network. Good!"
+fi
+
+# check if machine is available 
+# i.e. NOT in the middle of something (like creating image, re-loading OS, etc.)
+
+case $( nodeset $1 stat | gawk 'split($0, a, " ") {print a[2]}' ) in
+install )
+   echo -e "\nERROR: Machine '$1' is in the middle of re-loading OS!"
+   echo "ERROR INFO: (result of 'nodeset $1 stat'): `nodeset $1 stat`"
+   echo "Please try again later."
+   echo -e "Exit. Nothing was done!\n"
+   exit 1
+   ;;
+image )
+   echo -e "\nERROR: Machine '$1' is in the middle of creating image of OS!"
+   echo "ERROR INFO: (result of 'nodeset $1 stat'): `nodeset $1 stat`"
+   echo "Please try again later."
+   echo -e "Exit. Nothing was done!\n"
+   exit 1
+   ;;
+boot )
+   echo "Check: Machine '$1' is available. Good!" ;;
+* )
+   echo -e "\nERROR: Machine '$1' is in UKNOWN state!"
+   echo "ERROR INFO: (result of 'nodeset $1 stat'): `nodeset $1 stat`"
+   echo -e "Nothing can be done! Exit.\n"
+   exit 1
+   ;;
+esac
+
+# check if machine is accessible
+if [ -z "`psh $1 uname -r`" ]
+then
+   echo -e "\nERROR: Machine '$1' is NOT accessible!"
+   echo "ERROR INFO: possibly SSH deamon is NOT running on '$1'"
+   echo -e "Nothing can be done! Exit.\n"
+   exit 1
+else
+   echo "Check: Machine '$1' is accessible. Good!"
+fi
+
+# determine what OS 
+os=`ssh $1 uname -s`
+if [ $os == "CYGWIN_NT-5.1" ]
+then
+   os="WinXP"
+fi
+if [ $os == "CYGWIN_NT-5.2" ]
+then
+   os="Win2003"
+fi
+ver=`ssh $1 uname -r`
+
+case $os in
+Linux ) 
+   echo "Check: Machine '$1' is Linux machine ($ver). Good" ;;
+WinXP )
+   echo "Check: Machine '$1' is WindowsXP machine. Good." ;;
+Win2003 )
+   echo "Check: Machine '$1' is Windows2003 machine. Good." ;;
+*     ) 
+   echo "ERROR: Cannot determine OS of '$1'!"
+   echo "ERROR INFO: (result of 'ssh $1 uname -s'): `ssh $1 uname -s`"
+   exit 1
+   ;;
+esac
+
+#if [ $os == "Linux" ]
+#then
+#   echo -e "\nThis script temporarily works only with Windows machines. Sorry!"
+#   echo -e "Exit. Nothing was done!\n"
+#   exit 0
+#fi
+
+# check if <user_name> already exists on this machine
+if [[ $os == "Win2003" || $os == "WinXP" ]]
+then
+   if [ -z "`ssh $1 ls | grep -w list_users.vbs`" ]
+   then
+      echo -e "\nERROR: missing script: 'list_users.vbs'"
+      echo "ERROR: cannot continue! Exit."
+      exit 1
+   fi
+fi
+
+user_already_exists="no"
+if [[ $os == "Win2003" || $os == "WinXP" ]]
+then
+# Windows
+   if [ -n "`ssh $1 cscript.exe //Nologo list_users.vbs | grep -w $2`" ]
+   then
+      user_already_exists="yes"
+   fi
+else
+# Linux
+   if [ -n "`ssh $1 cat /etc/passwd | grep -w $2`" ]
+   then
+      user_already_exists="yes"
+   fi
+fi
+# create user if new
+if [ $user_already_exists == "yes" ]
+then
+   echo -e "\nWARNING: user '$2' already exists on $1 !"
+   echo "WARNING: Assuming that password is known."
+   echo "Do you want just enable WAN network interface? (y or n)"
+   read ans
+   if [ $ans != "y" ]
+   then
+      echo -e "Exit. Nothing was done!\n"
+      exit 0
+   fi
+else
+   if [[ $os == "Win2003" || $os == "WinXP" ]]
+   then
+# Windows
+      ssh $1 cscript.exe //Nologo add_user.vbs $2 $3
+   else
+# Linux
+      ssh $1 "adduser $2" > /dev/null
+      ssh $1 "echo $3 | passwd $2 --stdin" > /dev/null
+   fi
+fi
+
+# check if <user_name> exists NOW on this machine
+user_now_exists="yes"
+if [[ $os == "Win2003" || $os == "WinXP" ]]
+then
+# Windows
+   if [ -z "`ssh $1 cscript.exe //Nologo list_users.vbs | grep -w $2`" ]
+   then
+      user_now_exists="no"
+   fi
+else
+# Linux
+   if [ -z "`ssh $1 cat /etc/passwd | grep -w $2`" ]
+   then
+      user_now_exists="no"
+   fi
+fi
+if [ $user_now_exists == "yes" ]
+then
+   echo "Check: User '$2' exists now. Good!"
+else
+   echo -e "\nERROR: Could NOT create user '$2'!"
+#   echo "ERROR INFO: check 'add_user.vbs' script."
+   echo -e "\n Cannot continue! Exit.\n"
+   exit 1
+fi
+
+# Enable WAN interface
+#echo -n "Enabling WAN interface..."
+if [[ $os == "Win2003" || $os == "WinXP" ]]
+then
+# Windows
+   if [ -z "`ssh $1 ls | grep -w enWAN.vbs`" ]
+   then
+      echo -e "\nERROR: Missing script: 'enWAN.vbs'"
+      echo "ERROR: Cannot continue! Exit."
+      exit 1
+   fi
+   ssh $1 cscript.exe //Nologo enWAN.vbs
+else
+# Linux
+   if [ -n "`ssh $1 ifconfig | grep -w $wanip`" ]
+   then
+      echo "WAN is already enabled!"
+   else
+      touch ifcfg-eth1.tmp
+      for ln in `ssh $1 cat /etc/sysconfig/network-scripts/ifcfg-eth1`
+      do
+         if [ -n "`echo $ln | grep -w ONBOOT`" ]
+         then
+            echo "ONBOOT=yes" >> ifcfg-eth1.tmp
+         else
+            echo $ln >> ifcfg-eth1.tmp
+         fi
+      done
+      scp -q ifcfg-eth1.tmp $1:/etc/sysconfig/network-scripts/ifcfg-eth1 > /dev/null
+      psh $1 "service network restart" > /dev/null
+      rm -f ifcfg-eth1.tmp
+   fi
+fi
+#echo ""
+
+# check if WAN was actually enabled
+if [[ $os == "Win2003" || $os == "WinXP" ]]
+then
+   if [ -z "`ssh $1 ipconfig | grep -w $wanip`" ]
+   then
+      echo -e "\nERROR: Cannot ping WAN interface ($wanip)!"
+      echo -e "ERROR: Cannot continue! Exit.\n"
+      exit 1
+   fi
+fi
+if [ $os == "Linux" ]
+then
+   if [ -z "`ssh $1 ifconfig | grep -w $wanip`" ]
+   then
+      echo -e "\nERROR: Cannot ping WAN interface ($wanip)!"
+      echo -e "ERROR: Cannot continue! Exit.\n"
+      exit 1
+   fi
+fi
+
+echo -e "Check: WAN interface is enabled now. Good!\n"
+
+if [ -z $ans ]
+then
+   echo -e "\n User '$2' was created on machine '$1'."
+fi
+echo " Machine '$1' is ON-LINE now."
+if [[ $os == "Win2003" || $os == "WinXP" ]]
+then
+   echo " You can access '$1' machine using Remote Desktop client"
+else
+   echo " You can access '$1' machine using SSH client"
+fi
+echo " (use it's name: '$1.hpc.ncsu.edu' OR use it's IP address: '$wanip')."
+echo " NOTE: to log in use your name and password you provided to this script."
+echo ""
+

Propchange: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/reserve_computer_vcl
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/setpass.vbs
URL: http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/setpass.vbs?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/setpass.vbs (added)
+++ incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/setpass.vbs Fri Dec 12 10:20:10 2008
@@ -0,0 +1,16 @@
+    Option Explicit
+    Dim WshNetwork, strPass, oAdminAcct
+    Dim UserAccount
+
+    If WScript.Arguments.Count = 2 Then
+       UserAccount = WScript.Arguments.Item(0)
+       strPass = WScript.Arguments.Item(1)
+    Else
+       WScript.Echo "Usage: RandPass.wsf <user_account> <password>"
+       WScript.Quit
+    End If
+
+    Set WshNetwork = WScript.CreateObject("WScript.Network")
+    Set oAdminAcct = GetObject("WinNT://" & WshNetwork.ComputerName & "/" & UserAccount)
+
+    oAdminAcct.SetPassword strPass

Propchange: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/setpass.vbs
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/virt_lab_status_vcl
URL: http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/virt_lab_status_vcl?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/virt_lab_status_vcl (added)
+++ incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/virt_lab_status_vcl Fri Dec 12 10:20:10 2008
@@ -0,0 +1,186 @@
+#! /bin/sh
+if [ "$#" -lt 1 ]
+then
+#  echo "Not enough parameters!"
+  echo ""
+  echo "Usage: ./virt_lab_status all | <blade-range> "
+  echo "    examples: ./virt_lab_status all"
+  echo "              ./virt_lab_status vcla1-3"
+  echo "              ./virt_lab_status vcla1-3,vcla1-5"
+  echo ""
+  exit 0
+fi
+
+group=vcla1
+if [ $1 != "all" ]
+then
+  group=$1
+fi
+
+# initializing data arrays
+for ((i=1; i < 15 ; i++))
+do
+  blade_power_status[$i]="off"
+  blade_status[$i]="N/A"
+  blade_sshd_status[$i]="OFF"
+  blade_os[$i]="N/A    "
+  blade_wan_status[$i]="N/A"
+done
+
+#echo -e "Working...\n"
+echo -en "\nCollecting information."
+
+#power_status="`rpower blades1 stat`"
+power_status="`rpower $group stat`"
+for pw in $power_status
+do
+#   if [ -n "`echo $pw | grep blade`" ]
+   if [ -n "`echo $pw | grep vcla`" ]
+   then
+      ind="`echo $pw | gawk 'split($0, a, "-") {print a[2]}' | gawk 'split($0, a, ":") {print a[1]}'`"
+#      echo -en "$ind "
+   else
+      blade_power_status[$ind]=$pw
+#      echo $pw
+   fi
+done
+
+echo -n "."
+
+#status="`nodeset blades1 stat`"
+status="`nodeset $group stat`"
+skip=0
+for st in $status
+do
+#   if [ -n "`echo $st | grep blade`" ]
+   if [ -n "`echo $st | grep vcla`" ]
+   then
+      ind="`echo $st | gawk 'split($0, a, "-") {print a[2]}' | gawk 'split($0, a, ":") {print a[1]}'`"
+#      echo -en "$ind "
+      skip=0
+   else
+      if [ $skip == "0" ]
+      then
+        blade_status[$ind]=$st
+#        echo $st
+        skip=1
+      else
+        skip=0
+      fi
+   fi
+done
+
+echo -n "."
+
+#sshd_status="`psh blades1 uname -s`"
+sshd_status="`psh $group uname -s`"
+for ss in $sshd_status
+do
+#   if [ -n "`echo $ss | grep blade`" ]
+   if [ -n "`echo $ss | grep vcla`" ]
+   then
+      ind="`echo $ss | gawk 'split($0, a, "-") {print a[2]}' | gawk 'split($0, a, ":") {print a[1]}'`"
+#      echo -en "$ind "
+   else
+      if [ $ss == "noping" ]
+      then
+         blade_sshd_status[$ind]="N/A"
+      else
+         os=$ss
+         case $os in
+            CYGWIN_NT-5.1 )
+               os="WinXP" ;;
+            CYGWIN_NT-5.2 )
+               os="Win2003" ;;
+            Linux )
+               os="Linux" ;;
+            * )
+               os="Unknown" ;;
+         esac
+         blade_os[$ind]=$os
+         blade_sshd_status[$ind]="on"
+      fi
+#      echo "ss=$ss"
+   fi
+done
+
+echo -n "."
+
+touch wan.tmp
+#wan_status="`psh $group ipconfig; psh $group ifconfig`"
+psh $group ipconfig >> wan.tmp
+psh $group ifconfig >> wan.tmp
+blade_list="`nodels $group`"
+for bl in $blade_list
+do
+   i="`echo $bl | gawk 'split($0, a, "-") {print a[2]}' | gawk 'split($0, a, ":") {print a[1]}'`"
+   if [ ${blade_sshd_status[$i]} != "OFF" ]
+   then
+   num=`expr $i + 20`
+   wanip=152.1.14.$num
+   wanst="`cat wan.tmp | grep -w $wanip`"
+#   if [ -z "`echo $wan_status | grep -w $wanip`" ] 
+#   echo "wanst = $wanst"
+   if [ -z $wanst ] 
+   then
+      if [ ${blade_power_status[$i]} != "off" ]
+      then
+         blade_wan_status[$i]="$wanip:off"
+      fi
+   else
+      blade_wan_status[$i]="$wanip:ON"
+   fi
+   fi
+done
+rm -f wan.tmp
+
+echo -e ".\n"
+
+# for testing only
+#for ((i=1; i < 15 ; i++))
+#do
+#  echo "blade_power_status[$i]=${blade_power_status[$i]}"
+#  echo "blade_status[$i]=${blade_status[$i]}"
+#  echo "blade_sshd_status[$i]=${blade_sshd_status[$i]}"
+#  echo "blade_os[$i]=${blade_os[$i]}"
+#  echo "blade_wan_status[$i]=${blade_wan_status[$i]}"
+#  echo "================="
+#done
+#exit 0
+
+echo -e "Name\t       Power   Status          SSHD      OS            WAN <IP>:<status>"
+echo "================================================================================="
+#blade_list="`nodels $group`"
+#blade_list="`nodels $group | sort --key=1.8,1.9 -n`" -- good for names "blade"
+blade_list="`nodels $group | sort --key=1.7,1.8 -n`"
+for bl in $blade_list
+do
+   ind="`echo $bl | gawk 'split($0, a, "-") {print a[2]}' | gawk 'split($0, a, ":") {print a[1]}'`"
+   echo -en "$bl" 
+# Power?
+   echo -en " \t${blade_power_status[$ind]}"
+# Status?
+   echo -en "\t${blade_status[$ind]}"
+# SSHD is running?
+   echo -en "\t\t${blade_sshd_status[$ind]}"
+# OS?
+   echo -en "\t${blade_os[$ind]}   "
+# WAN status?
+   echo -en "\t${blade_wan_status[$ind]}"
+   echo ""
+done
+echo ""
+exit 0
+
+# check if machine IS on local network
+#if [ "`pping $1 | grep -w noping`" ]
+#then
+#   echo -e "\nERROR: Machine '$1' is NOT on local network!"
+#   echo "ERROR INFO: (result of 'pping $1'): `pping $1`"
+#   echo -e "Nothing can be done! Exit.\n"
+#   exit 1
+#else
+#   echo "Check: Machine '$1' IS on local network. Good!"
+#fi
+
+

Propchange: incubator/vcl/tags/import/managementnode/legacy_vcl_vbs_scripts/virt_lab_status_vcl
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/vcl/tags/import/managementnode/lib/VCL/.perltidyrc
URL: http://svn.apache.org/viewvc/incubator/vcl/tags/import/managementnode/lib/VCL/.perltidyrc?rev=726079&view=auto
==============================================================================
--- incubator/vcl/tags/import/managementnode/lib/VCL/.perltidyrc (added)
+++ incubator/vcl/tags/import/managementnode/lib/VCL/.perltidyrc Fri Dec 12 10:20:10 2008
@@ -0,0 +1,107 @@
+# This is a .perltidyrc configuration file
+# It is used by the perltidy module for formatting source code
+# http://perltidy.sourceforge.net/perltidy.html
+
+# GENERAL CONFIGURATION
+-log     # save the .log file
+-se      # errors to standard error output
+-w       # show all warnings
+-syn     # perform Perl syntax check
+-pscf=-c # don't run Perl syntax taint checking
+-b	 # modify files in place
+
+# INDENTATION
+-et=3    # replace each 3 leading space charaters with 1 tab character
+-i=3     # use 3 columns per indentation level
+-nola    # do not outdent labels
+#-naws    # don't add whitespace
+
+
+# COMMENTS
+-nbbc    # don't add blank lines before a full-line comments
+-nbbs    # don't add blank lines before a sub definitions
+-ibc     # indent block comments
+-isbc    # indent spaced block comments
+
+
+# BLANK LINES AND LINE LENGTH
+-l=0     # don't set a maximum line length, leave long lines alone
+-mbl=3   # set the maximum number of consecutive blank lines
+-ole=win # output line endings for a specific system (Windows)
+
+# TIGHTNESS
+-lp      # line up parentheses
+
+-vt=2
+-vtc=2
+# -vt=0 always break a line after opening token (default)
+# -vt=1 do not break unless this would produce more than one step in indentation in a line
+# -vt=2 never break a line after opening token
+# -vtc=0 always break a line before a closing token (default)
+# -vtc=1 do not break before a closing token which is followed by a semicolon or another closing token, and is not in a list environment
+# -vtc=2 never break before a closing token
+
+#-pvt=2    # paren vert tight
+#-pvtc=2   # paren closing vert tight
+
+#-sbvt=2   # square vert tight
+#-sbvtc=2  # square closing vert tight
+
+#-bvt=2    # non-code block braces
+#-bvtc=2   # non-code block closing braces
+
+#-bbvt=2   # just like the -vt=n flag but applies to opening code block braces
+
+#-sot    # stack opening tokens when possible to avoid lines with isolated opening tokens
+        # -sot is a synonym for -sop -sohb -sosb
+#-sop    # stack opening paren
+#-sohb   # stack opening hash brace
+#-sosb   # stack opening square bracket
+
+#-sct    # stack closing tokens
+        # -sct is a synonym for -scp -schb -scsb
+#-scp    # stack closing paren
+#-schb   # stack closing hash brace
+#-scsb   # stack closing square bracket
+
+-pt=2    # parenthesis tightness, no spaces after ( and before )
+# if ( ( my $len_tab = length( $tabstr ) ) > 0 ) {  # -pt=0
+# if ( ( my $len_tab = length($tabstr) ) > 0 ) {    # -pt=1 (default)
+# if ((my $len_tab = length($tabstr)) > 0) {        # -pt=2
+
+-sbt=2   # square bracket tightness, no spaces after [ and before ]
+# $width = $col[ $j + $k ] - $col[ $j ];  # -sbt=0
+# $width = $col[ $j + $k ] - $col[$j];    # -sbt=1 (default)
+# $width = $col[$j + $k] - $col[$j];      # -sbt=2
+
+-bt=2    # curly brace tightness, no spaces after { and before }
+# $obj->{ $parsed_sql->{ 'table' }[0] };    # -bt=0
+# $obj->{ $parsed_sql->{'table'}[0] };      # -bt=1 (default)
+# $obj->{$parsed_sql->{'table'}[0]};        # -bt=2
+
+-bbt=2   # curly brace tightness which contain blocks of code
+# %bf = map { $_ => -M $_ } grep { /\.deb$/ } dirents '.'; # -bbt=0 (default)
+# %bf = map { $_ => -M $_ } grep {/\.deb$/} dirents '.';   # -bbt=1
+# %bf = map {$_ => -M $_} grep {/\.deb$/} dirents '.';     # -bbt=2
+
+-nsts    # no space before semicolons
+# $i = 1 ;     #  -sts
+# $i = 1;      #  -nsts   (default)
+
+-nsfs    # no spaces between special semicolons in for loops
+# for ( @a = @$ap, $u = shift @a ; @a ; $u = $v ) {  # -sfs (default)
+# for ( @a = @$ap, $u = shift @a; @a; $u = $v ) {    # -nsfs
+
+
+# CLOSING SIDE SCOMMENTS
+-csc     # add closing side comments, adds or updates closing side comments
+# sub message {
+# } ## end sub message <-- -csc adds this
+
+#-cscw   # enable closing side-comment warnings
+
+-csci=10 # minimum number of lines that a block must have in order for a closing side comment to be added
+
+-csct=40 # closing side comment maximum text
+
+-csce=2  # each elsif is also given the text of the opening if statement