pf-tools commit: r610 [ccaillet-guest] - in /trunk: debian/changelog lib/PFTools/Conf.pm lib/PFTools/Net.pm sbin/mk_pxelinuxcfg

parmelan-guest at users.alioth.debian.org parmelan-guest at users.alioth.debian.org
Mon Jul 21 14:22:33 UTC 2008


Author: ccaillet-guest
Date: Mon Jul 21 14:22:33 2008
New Revision: 610

URL: http://svn.debian.org/wsvn/pf-tools/?sc=1&rev=610
Log:
* Add : filter_systemmap for getting the system map filename
  from kernel pxefilename
* Add : function Get_Active_Systemmap to Net.pm
* Change : on mk_pxefilename for extracting kernel name for building pxe boot
  file from Get_Active_Filename
* Fix : fix HOSTNAME regexp on Conf.pm and introducing POPNAME var

Modified:
    trunk/debian/changelog
    trunk/lib/PFTools/Conf.pm
    trunk/lib/PFTools/Net.pm
    trunk/sbin/mk_pxelinuxcfg

Modified: trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pf-tools/trunk/debian/changelog?rev=610&op=diff
==============================================================================
--- trunk/debian/changelog (original)
+++ trunk/debian/changelog Mon Jul 21 14:22:33 2008
@@ -1,3 +1,14 @@
+pf-tools (0.33-0+RC2) unstable; urgency=low
+
+  * Add : filter_systemmap for getting the system map filename
+    from kernel pxefilename
+  * Add : function Get_Active_Systemmap to Net.pm
+  * Change : on mk_pxefilename for extracting kernel name for building pxe boot
+    file from Get_Active_Filename
+  * Fix : fix HOSTNAME regexp on Conf.pm and introducing POPNAME var
+
+ -- Christophe Caillet <quadchris at free.fr>  Mon, 21 Jul 2008 16:11:14 +0200
+
 pf-tools (0.33-0+RC1) unstable; urgency=low
 
   * preparing release

Modified: trunk/lib/PFTools/Conf.pm
URL: http://svn.debian.org/wsvn/pf-tools/trunk/lib/PFTools/Conf.pm?rev=610&op=diff
==============================================================================
--- trunk/lib/PFTools/Conf.pm (original)
+++ trunk/lib/PFTools/Conf.pm Mon Jul 21 14:22:33 2008
@@ -88,12 +88,13 @@
 
 chomp( $SUBST{'OS_RELEASE'} = `/bin/uname -r` );
 
-# $SUBST{'HOSTNAME'} =~ m/^(.*?)(\d*)([a-z]*)$/;
 $SUBST{'HOSTNAME'} =~ m/^(([a-z]{3}[\d]{1})-)?([a-z\-]+)([\d]*)([a-z]*)$/;
-$SUBST{'HOSTTYPE'}      = $1;
-$SUBST{'HOSTDIGITS'}    = $2;
-$SUBST{'HOSTCLUSTER'}   = $1 . $2;
-$SUBST{'HOSTNODEINDEX'} = $3;
+
+$SUBST{'HOSTTYPE'}      = $3;
+$SUBST{'HOSTDIGITS'}    = $4;
+$SUBST{'HOSTCLUSTER'}   = $3 . $4;
+$SUBST{'HOSTNODEINDEX'} = $5;
+$SUBST{'POPNAME'}       = $2;
 
 $SUBST{'HOSTNUM'} = $SUBST{'HOSTDIGITS'};
 $SUBST{'HOSTNUM'} =~ s/^0*//;

Modified: trunk/lib/PFTools/Net.pm
URL: http://svn.debian.org/wsvn/pf-tools/trunk/lib/PFTools/Net.pm?rev=610&op=diff
==============================================================================
--- trunk/lib/PFTools/Net.pm (original)
+++ trunk/lib/PFTools/Net.pm Mon Jul 21 14:22:33 2008
@@ -34,6 +34,7 @@
     Init_lib_net
 
     Get_Active_Filename
+    Get_Active_Systemmap
     Get_Ordered_Filtered_Hosts
     Get_dns_from_hostname
     Get_dns_from_zone
@@ -675,8 +676,20 @@
 
     return ( $M->{'umlfilename'} ) if ($PFTOOLS_VARS->{'UML'});
     return ( $M->{'vmwfilename'} ) if ($PFTOOLS_VARS->{'VMWARE'});
-    return ( $M->{'pxefilename'} );
-
+    if ( $M->{'arch'} eq 'amd64' ) {
+	return ( $M->{'arch'}."/".$M->{'pxefilename'} );
+    }
+    else {
+	return ( $M->{'pxefilename'} );
+    }
+}
+
+sub Get_Active_Systemmap {
+    my ( $Z, $host ) = @_;
+
+    my $system_map = Get_Active_Filename ( $Z, $host ) ;
+    $system_map =~ s/vmlinuz/System.map/ ;
+    return $system_map ;
 }
 
 sub Get_dns_from_hostname {

Modified: trunk/sbin/mk_pxelinuxcfg
URL: http://svn.debian.org/wsvn/pf-tools/trunk/sbin/mk_pxelinuxcfg?rev=610&op=diff
==============================================================================
--- trunk/sbin/mk_pxelinuxcfg (original)
+++ trunk/sbin/mk_pxelinuxcfg Mon Jul 21 14:22:33 2008
@@ -173,13 +173,9 @@
 								}
 	
 								my $temptemplatecontent = join '', @{ $templates->{$template_name} };
-								if ( $M->{'arch'} eq 'amd64' ) {
-									$temptemplatecontent =~ s/%KERNEL%/$M->{'arch'}\/$M->{'pxefilename'}/gs;
-								}
-								else {
-									$temptemplatecontent =~ s/%KERNEL%/$M->{'pxefilename'}/gs;
-								}
-								
+								my $kernel_filename	= Get_Active_Filename ( $Z, $m ) ;
+								$temptemplatecontent =~ s/%KERNEL%/$kernel_filename/gs;
+
 								if ( $debian_installer ) {
 									# Building preseed file
 									my $preseed_file = Build_preseed_filename ( $m, $M ) ;




More information about the pf-tools-commits mailing list