pf-tools commit: r630 [ccaillet-guest] - in /branches/0.33-stable: debian/changelog lib/PFTools/Net.pm sbin/mk_pxelinuxcfg
parmelan-guest at users.alioth.debian.org
parmelan-guest at users.alioth.debian.org
Tue Aug 12 15:14:51 UTC 2008
Author: ccaillet-guest
Date: Tue Aug 12 15:14:50 2008
New Revision: 630
URL: http://svn.debian.org/wsvn/pf-tools/?sc=1&rev=630
Log:
* Bugfix release
* Add : Get_PXE_Filename function for getting pxefilename
* Fix : use Get_PXE_Filename instead of Get_Active_Filename in
mk_pxelinuxcfg for building pxe files with the correct pxefilename
Modified:
branches/0.33-stable/debian/changelog
branches/0.33-stable/lib/PFTools/Net.pm
branches/0.33-stable/sbin/mk_pxelinuxcfg
Modified: branches/0.33-stable/debian/changelog
URL: http://svn.debian.org/wsvn/pf-tools/branches/0.33-stable/debian/changelog?rev=630&op=diff
==============================================================================
--- branches/0.33-stable/debian/changelog (original)
+++ branches/0.33-stable/debian/changelog Tue Aug 12 15:14:50 2008
@@ -1,3 +1,12 @@
+pf-tools (0.33.1-1) unstable; urgency=low
+
+ * Bugfix release
+ * Add : Get_PXE_Filename function for getting pxefilename
+ * Fix : use Get_PXE_Filename instead of Get_Active_Filename in
+ mk_pxelinuxcfg for building pxe files with the correct pxefilename
+
+ -- Christophe Caillet <quadchris at free.fr> Tue, 12 Aug 2008 17:09:16 +0200
+
pf-tools (0.33.0-1) unstable; urgency=low
* Release version
Modified: branches/0.33-stable/lib/PFTools/Net.pm
URL: http://svn.debian.org/wsvn/pf-tools/branches/0.33-stable/lib/PFTools/Net.pm?rev=630&op=diff
==============================================================================
--- branches/0.33-stable/lib/PFTools/Net.pm (original)
+++ branches/0.33-stable/lib/PFTools/Net.pm Tue Aug 12 15:14:50 2008
@@ -34,6 +34,7 @@
Init_lib_net
Get_Active_Filename
+ Get_PXE_Filename
Get_Active_Systemmap
Get_Ordered_Filtered_Hosts
Get_dns_from_hostname
@@ -653,7 +654,7 @@
return ( $M->{'cmdline'} );
}
-sub Get_Active_Filename {
+sub Get_PXE_Filename {
my ( $Z, $host ) = @_;
my $host2 = $host;
@@ -674,6 +675,35 @@
return undef;
}
+ if ( $M->{'arch'} eq 'amd64' ) {
+ return ( $M->{'arch'}."/".$M->{'pxefilename'} );
+ }
+ else {
+ return ( $M->{'pxefilename'} );
+ }
+}
+
+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' ) {
@@ -687,7 +717,7 @@
sub Get_Active_Systemmap {
my ( $Z, $host ) = @_;
- my $system_map = Get_Active_Filename ( $Z, $host ) ;
+ my $system_map = Get_PXE_Filename ( $Z, $host ) ;
$system_map =~ s/vmlinuz/System.map/ ;
return $system_map ;
}
Modified: branches/0.33-stable/sbin/mk_pxelinuxcfg
URL: http://svn.debian.org/wsvn/pf-tools/branches/0.33-stable/sbin/mk_pxelinuxcfg?rev=630&op=diff
==============================================================================
--- branches/0.33-stable/sbin/mk_pxelinuxcfg (original)
+++ branches/0.33-stable/sbin/mk_pxelinuxcfg Tue Aug 12 15:14:50 2008
@@ -181,7 +181,7 @@
}
my $temptemplatecontent = join '', @{ $templates->{$template_name} };
- my $kernel_filename = Get_Active_Filename ( $Z, $m ) ;
+ my $kernel_filename = Get_PXE_Filename ( $Z, $m ) ;
if ( ! defined $kernel_filename ) {
warn "Unable to retrieve kernel filename for host ".$m."\n" ;
}
More information about the pf-tools-commits
mailing list