pf-tools commit: r634 [ccaillet-guest] - in /trunk: debian/changelog lib/PFTools/Net.pm

parmelan-guest at users.alioth.debian.org parmelan-guest at users.alioth.debian.org
Mon Aug 18 12:39:20 UTC 2008


Author: ccaillet-guest
Date: Mon Aug 18 12:39:19 2008
New Revision: 634

URL: http://svn.debian.org/wsvn/pf-tools/?sc=1&rev=634
Log:
Factorizing code for Get_Active_Filename in Net.pm with Get_PXE_Filename

Modified:
    trunk/debian/changelog
    trunk/lib/PFTools/Net.pm

Modified: trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pf-tools/trunk/debian/changelog?rev=634&op=diff
==============================================================================
--- trunk/debian/changelog (original)
+++ trunk/debian/changelog Mon Aug 18 12:39:19 2008
@@ -1,3 +1,9 @@
+pf-tools (0.34.0-0WIP) unstable; urgency=low
+
+  * Factorizing code for Get_Active_Filename in Net.pm with Get_PXE_Filename
+
+ -- Christophe Caillet <quadchris at free.fr>  Mon, 18 Aug 2008 13:48:13 +0200
+
 pf-tools (0.33.1-1) unstable; urgency=low
 
   * Bugfix release

Modified: trunk/lib/PFTools/Net.pm
URL: http://svn.debian.org/wsvn/pf-tools/trunk/lib/PFTools/Net.pm?rev=634&op=diff
==============================================================================
--- trunk/lib/PFTools/Net.pm (original)
+++ trunk/lib/PFTools/Net.pm Mon Aug 18 12:39:19 2008
@@ -687,32 +687,9 @@
 sub Get_Active_Filename {
     my ( $Z, $host ) = @_;
 
-    my $host2 = $host;
-    $host2 =~ s/^(.+)\.$Z->{SOA}->{name}$/$1/;
-    $host2 =~ m/^([^.]+)(\.([^.]+))?$/;
-    my $hostshort = $1;
-    my $hostvlan  = $3;
-
-    if ( !defined $hostshort ) {
-	return undef;
-    }
-
-    my $hostclass = Host_class( $hostshort, $Z );
-    my $N         = $Z->{'SERVERS'}->{'BY_NAME'}->{$hostclass};
-    my $M         = $N->{'SRVLIST'}->{$hostshort};
-
-    if ( !defined($M) ) {
-	return undef;
-    }
-
     return ( $M->{'umlfilename'} ) if ($PFTOOLS_VARS->{'UML'} && defined $M->{'umlfilename'});
     return ( $M->{'vmwfilename'} ) if ($PFTOOLS_VARS->{'VMWARE'} && defined $M->{'vmwfilename'});
-    if ( $M->{'arch'} eq 'amd64' ) {
-	return ( $M->{'arch'}."/".$M->{'pxefilename'} );
-    }
-    else {
-	return ( $M->{'pxefilename'} );
-    }
+    return Get_PXE_Filename ( $Z, $host ) ;
 }
 
 sub Get_Active_Systemmap {




More information about the pf-tools-commits mailing list