pf-tools commit: r597 [ccaillet-guest] - in /trunk: README.doc debian/changelog lib/PFTools/Net.pm sbin/mk_pxelinuxcfg templates/debian-installer.pxe

parmelan-guest at users.alioth.debian.org parmelan-guest at users.alioth.debian.org
Mon Jun 2 15:35:44 UTC 2008


Author: ccaillet-guest
Date: Mon Jun  2 15:35:44 2008
New Revision: 597

URL: http://svn.debian.org/wsvn/pf-tools/?sc=1&rev=597
Log:
* adding %ARCH% in pxe templates, now allowed arch for automated deployment
  via pf-tools is i386 and amd64. If it's not defined default value is i386
* adding arch parameter on host definition in private-network
* fixing on debian-installer pxe template the serial parameter for
  bootloader with CTS/DTS activated on NPORT
* adding race condition in Add_server on PFTools::Net for checking arch
  parameter defined on private-network
* updating README.doc with new options

Modified:
    trunk/README.doc
    trunk/debian/changelog
    trunk/lib/PFTools/Net.pm
    trunk/sbin/mk_pxelinuxcfg
    trunk/templates/debian-installer.pxe

Modified: trunk/README.doc
URL: http://svn.debian.org/wsvn/pf-tools/trunk/README.doc?rev=597&op=diff
==============================================================================
--- trunk/README.doc (original)
+++ trunk/README.doc Mon Jun  2 15:35:44 2008
@@ -6,6 +6,27 @@
 
 ========================================================================
 private-network :
+
+* arch
+
+  [optional]
+
+  If defined, it uses this architecture for debian-installer. For now i386 and
+  amd64 are allowed
+
+  Sample use :
+    To define architecture i386 by default and amd64 for hos01
+
+    [host%%]
+	...
+	arch.1		= amd64
+
+    is equivalent to
+
+    [host%%]
+	...
+	arch.default	= i386
+	arch.1		= amd64
 
 * bonding.<bond_iface>.HOSTNUM or bonding.<bond_iface>.default
 
@@ -116,6 +137,21 @@
         ipstart.vlan-system = 18.0
         ip.vlan-systeme.1   = 18.10
 
+* preseedfilename
+
+  [optional]
+
+  If defined, it uses this filename for getting on deploy.private the preseed file
+  for automated debian-installer process
+
+  Sample use :
+
+    To use a preseed file : debian-preseed.txt for host01
+
+    [host%%]
+	...
+	preseedfilename.1	= debian-preseed.txt
+
 * pxetemplate
 
   [optional]

Modified: trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pf-tools/trunk/debian/changelog?rev=597&op=diff
==============================================================================
--- trunk/debian/changelog (original)
+++ trunk/debian/changelog Mon Jun  2 15:35:44 2008
@@ -1,4 +1,18 @@
-pf-tools (0.33-0WIP1) unstable; urgency=low
+pf-tools (0.33-0WIP2) unstable; urgency=low
+
+  [ Christophe Caillet ]
+  * adding %ARCH% in pxe templates, now allowed arch for automated deployment
+    via pf-tools is i386 and amd64. If it's not defined default value is i386
+  * adding arch parameter on host definition in private-network
+  * fixing on debian-installer pxe template the serial parameter for
+    bootloader with CTS/DTS activated on NPORT
+  * adding race condition in Add_server on PFTools::Net for checking arch
+    parameter defined on private-network
+  * updating README.doc with new options
+
+ -- Christophe Caillet <quadchris at free.fr>  Mon, 02 Jun 2008 17:17:50 +0200
+
+pf -tools (0.33-0WIP1) unstable; urgency=low
 
   [ Christophe Caillet ]
   * Modifying lib-* to proper perl modules devel style

Modified: trunk/lib/PFTools/Net.pm
URL: http://svn.debian.org/wsvn/pf-tools/trunk/lib/PFTools/Net.pm?rev=597&op=diff
==============================================================================
--- trunk/lib/PFTools/Net.pm (original)
+++ trunk/lib/PFTools/Net.pm Mon Jun  2 15:35:44 2008
@@ -71,6 +71,9 @@
 my $ERR_OPEN   = 1;
 my $ERR_SYNTAX = 2;
 
+# Allowed architecture
+my $ALLOWED_ARCH = 'i386|amd64' ;
+
 #=======================================================#
 #							#
 #	lib-net						#
@@ -920,19 +923,29 @@
 		'pxetemplate',
 		'preseedfilename',
 		'dns',
+		'arch',
 		'initrd',
 		'cmdline',
 		'console'
 	    ) ;
 	    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} ) ;
+		    }
 		    $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'} ) ;
+		    }
 		    $M->{$key} = $S->{$key}->{'default'} ;
 		}
 		elsif ( $key eq 'initrd' ) {
 		    $M->{'initrd'} = 'initrd' ;
+		}
+		elsif ( $key eq 'arch' ) {
+		    $M->{'arch'} = 'i386' ;
 		}
 		elsif ( $key eq 'console' && defined $Z->{'SOA'}->{'console'} ) {
 			$M->{'console'} = $Z->{'SOA'}->{'console'};

Modified: trunk/sbin/mk_pxelinuxcfg
URL: http://svn.debian.org/wsvn/pf-tools/trunk/sbin/mk_pxelinuxcfg?rev=597&op=diff
==============================================================================
--- trunk/sbin/mk_pxelinuxcfg (original)
+++ trunk/sbin/mk_pxelinuxcfg Mon Jun  2 15:35:44 2008
@@ -125,6 +125,9 @@
  							my $ramdisk_size = Get_Ramdisk_size_from_Initrd($M->{'initrd'} );
 							$temptemplatecontent =~ s/%RAMDISK_SIZE%/$ramdisk_size/gs;
 
+							my $arch = $M->{'arch'} || 'i386' ;
+							$temptemplatecontent =~ s/%ARCH%/$arch/gs;
+
 							my $cmdline = $M->{'cmdline'} || '';
 							$temptemplatecontent =~ s/%CMDLINE%/$cmdline/gs;
 

Modified: trunk/templates/debian-installer.pxe
URL: http://svn.debian.org/wsvn/pf-tools/trunk/templates/debian-installer.pxe?rev=597&op=diff
==============================================================================
--- trunk/templates/debian-installer.pxe (original)
+++ trunk/templates/debian-installer.pxe Mon Jun  2 15:35:44 2008
@@ -1,15 +1,15 @@
-SERIAL 0 %SERIAL_SPEED% 0
-DISPLAY debian-installer/i386/boot-screens/myboot.txt
+SERIAL 0 %SERIAL_SPEED% 2
+DISPLAY debian-installer/%ARCH%/boot-screens/myboot.txt
 
 DEFAULT linux
 
 LABEL install
-	kernel %KERNEL%
-	append DEBCONF_PRIORITY=critical vga=normal auto=true initrd=%INITRD% url=%PRESEED_URL% url/checksum=%PRESEED_MD5% -- %CONSOLE% %CMDLINE%
+	kernel debian-installer/%ARCH%/linux
+	append DEBCONF_PRIORITY=critical vga=normal auto=true initrd=%INITRD% interface=eth0 netcfg/no_default_route=true url=%PRESEED_URL% url/checksum=%PRESEED_MD5% -- %CONSOLE% %CMDLINE%
 
 LABEL linux
 	kernel %KERNEL%
-	append vga=normal root=/dev/sda3 -- %CONSOLE% %CMDLINE%
+	append vga=normal root=/dev/sda2 -- %CONSOLE% %CMDLINE%
 
 PROMPT 1
 TIMEOUT 100




More information about the pf-tools-commits mailing list