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

parmelan-guest at users.alioth.debian.org parmelan-guest at users.alioth.debian.org
Fri Jul 11 13:40:57 UTC 2008


Author: ccaillet-guest
Date: Fri Jul 11 13:40:57 2008
New Revision: 605

URL: http://svn.debian.org/wsvn/pf-tools/?sc=1&rev=605
Log:
* fix on preseed repository init
* cosmetic on error and warn messages on Net.pm
* use a directory amd64 inside /distrib/tftpboot for storing pxe kernels

Modified:
    trunk/debian/changelog
    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=605&op=diff
==============================================================================
--- trunk/debian/changelog (original)
+++ trunk/debian/changelog Fri Jul 11 13:40:57 2008
@@ -4,8 +4,11 @@
   * modifying Makefile for templates which are now installed on
     /usr/share/pf-tools/templates 
   * fix on kernel debian package name in mk_pxelinuxcfg 
-
- -- Christophe Caillet <tof at sitadelle.com>  Fri, 11 Jul 2008 10:15:36 +0200
+  * fix on preseed repository init
+  * cosmetic on error and warn messages on Net.pm
+  * use a directory amd64 inside /distrib/tftpboot for storing pxe kernels
+
+ -- Christophe Caillet <tof at sitadelle.com>  Fri, 11 Jul 2008 15:39:52 +0200
 
 pf-tools (0.33-0WIP2) unstable; urgency=low
 

Modified: trunk/lib/PFTools/Net.pm
URL: http://svn.debian.org/wsvn/pf-tools/trunk/lib/PFTools/Net.pm?rev=605&op=diff
==============================================================================
--- trunk/lib/PFTools/Net.pm (original)
+++ trunk/lib/PFTools/Net.pm Fri Jul 11 13:40:57 2008
@@ -934,23 +934,26 @@
 	    foreach my $key ( @common_keys ) {
 		if ( defined ( $S->{$key}->{$mnamindexnum} ) ) {
 		    if ( $key eq 'arch' && $S->{$key}->{$mnamindexnum} !~ /^$ALLOWED_ARCH$/ ) {
-			Abort( $ERR_SYNTAX, "Invalid architecture ".$S->{$key}->{$mnamindexnum} ) ;
+			Abort( $ERR_SYNTAX, "Invalid architecture for host ".$srv.$mnamindexnum." : ".$S->{$key}->{$mnamindexnum} ) ;
 		    } elsif ( $key eq 'deploymode' ) {
-			Abort ( $ERR_SYNTAX, "Invalid deploymode key ".$S->{$key}->{$mnamindexnum} )
+			Abort ( $ERR_SYNTAX, "Invalid deploymode key for host ".$srv.$mnamindexnum." : ".$S->{$key}->{$mnamindexnum} )
 				if ( $S->{$key}->{$mnamindexnum} !~ /^$ALLOWED_DEPLOYMODE$/ ) ;
-			Warn ( $ERR_SYNTAX, "No need to defined initrd" ) if ( defined $S->{'initrd'}->{$mnamindexnum} ) ;
+			Warn ( $ERR_SYNTAX, "No need to defined initrd for host ".$srv.$mnamindexnum ) if ( defined $S->{'initrd'}->{$mnamindexnum} ) ;
 		    }
 		    $M->{$key} = $S->{$key}->{$mnamindexnum} ;
 		}
 		elsif ( defined ( $S->{$key}->{'default'} ) ) {
 		    if ( $key eq 'arch' && $S->{$key}->{'default'} !~ /^$ALLOWED_ARCH$/ ) {
-			Abort( $ERR_SYNTAX, "Invalid architecture ".$S->{$key}->{'default'} ) ;
+			Abort( $ERR_SYNTAX, "Invalid default architecture for host ".$srv." : ".$S->{$key}->{'default'} ) ;
 		    } elsif ( $key eq 'deploymode' ) {
-			Abort ( $ERR_SYNTAX, "Invalid deploymode key ".$S->{$key}->{'default'} )
+			Abort ( $ERR_SYNTAX, "Invalid default deploymode key ".$S->{$key}->{'default'} )
 				if ( $S->{$key}->{'default'} !~ /^$ALLOWED_DEPLOYMODE$/ ) ;
-			Warn ( $ERR_SYNTAX, "No need to defined initrd" ) if ( defined $S->{'initrd'} ) ;
+			Warn ( $ERR_SYNTAX, "No need to defined initrd for host ".$srv ) if ( defined $S->{'initrd'}->{'default'} ) ;
 		    }
 		    $M->{$key} = $S->{$key}->{'default'} ;
+		}
+		elsif ( $key eq 'deploymode' ) {
+		    $M->{'deploymode'} = 'pf-tools' ;
 		}
 		elsif ( $key eq 'initrd' && $M->{'deploymode'} eq 'pf-tools' ) {
 		    $M->{'initrd'} = 'initrd' ;

Modified: trunk/sbin/mk_pxelinuxcfg
URL: http://svn.debian.org/wsvn/pf-tools/trunk/sbin/mk_pxelinuxcfg?rev=605&op=diff
==============================================================================
--- trunk/sbin/mk_pxelinuxcfg (original)
+++ trunk/sbin/mk_pxelinuxcfg Fri Jul 11 13:40:57 2008
@@ -38,7 +38,7 @@
 	my ($login,$pass,$uid,$gid) = getpwnam ( 'www-data' ) ;
 	chown $uid, $gid, $PRESEED_REPOS ;
 	my $mode = '2750' ;
-	chmod $mode, $PRESEED_REPOS ;
+	chmod ( oct ( $mode ), $PRESEED_REPOS ) ;
 }
 
 my $TPL_PRESEED		= "/usr/share/pf-tools/templates/debian-preseed.tpl" ;
@@ -168,8 +168,12 @@
 								}
 	
 								my $temptemplatecontent = join '', @{ $templates->{$template_name} };
-	
-								$temptemplatecontent =~ s/%KERNEL%/$M->{'pxefilename'}/gs;
+								if ( $M->{'arch'} eq 'amd64' ) {
+									$temptemplatecontent =~ s/%KERNEL%/$M->{'arch'}\/$M->{'pxefilename'}/gs;
+								}
+								else {
+									$temptemplatecontent =~ s/%KERNEL%/$M->{'pxefilename'}/gs;
+								}
 								
 								if ( $debian_installer ) {
 									# Building preseed file




More information about the pf-tools-commits mailing list