Author: fapeeler
Date: Wed Jan 14 11:34:37 2009
New Revision: 734490

URL: http://svn.apache.org/viewvc?rev=734490&view=rev
Log:
VCL-53

changed getdynamicaddress routine from using netsh diag show ip to ipconfig. 
netsh randomally fails to produce any output and  
is also not available under vista. might as well be consistent between windows 
OS's


Modified:
    incubator/vcl/trunk/managementnode/lib/VCL/utils.pm

Modified: incubator/vcl/trunk/managementnode/lib/VCL/utils.pm
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/utils.pm?rev=734490&r1=734489&r2=734490&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/utils.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/utils.pm Wed Jan 14 11:34:37 2009
@@ -1647,7 +1647,7 @@
 
        my $identity;
        my $dynaIPaddress = 0;
-       if ($osname =~ /vista/) {
+       if ($osname =~ /vista|win|vmwarewin|vmwareesxwin/) {
                $identity = $IDENTITY_wxp;
 
                @sshcmd = run_ssh_command($node, $identity, "ipconfig", "root");
@@ -1668,26 +1668,6 @@
                }
 
        } ## end if ($osname =~ /win|vmwarewin/)
-       elsif ($osname =~ /win|vmwarewin/) {
-               $identity = $IDENTITY_wxp;
-
-               @sshcmd = run_ssh_command($node, $identity, "netsh diag show 
ip", "root");
-               for my $l (@{$sshcmd[1]}) {
-                       # skip class a,b,c private addresses
-                       next if ($l =~ /IPAddress = $privateIP/);
-                       next if ($l =~ /IPAddress = 10.([.0-9]*)/);
-                       next if ($l =~ /IPAddress = 127([.0-9]*)/);
-                       next if ($l =~ /IPAddress = 172([.0-9]*)/);
-                       next if ($l =~ /IPAddress = 192([.0-9]*)/);
-                       if ($l =~ /IPAddress = ([.0-9]*)/) {
-                               if ($l !~ /IPAddress = $privateIP/) {
-                                       #to cover sites using eth0 as public
-                                       $dynaIPaddress = $1;
-                               }
-                       }
-               }
-
-       } ## end if ($osname =~ /win|vmwarewin/)
        elsif ($osname =~ /^(rh|fc)/) {
                $identity = $IDENTITY_bladerhel;
                undef @sshcmd;


Reply via email to