pf-tools commit: r561 [ccaillet-guest] - in /trunk: README.doc 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
Fri Jan 18 15:27:46 UTC 2008


Author: ccaillet-guest
Date: Fri Jan 18 15:27:46 2008
New Revision: 561

URL: http://svn.debian.org/wsvn/pf-tools/?sc=1&rev=561
Log:
* forward port console parameter from "0.32-stable" branch

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

Modified: trunk/README.doc
URL: http://svn.debian.org/wsvn/pf-tools/trunk/README.doc?rev=561&op=diff
==============================================================================
--- trunk/README.doc (original)
+++ trunk/README.doc Fri Jan 18 15:27:46 2008
@@ -23,6 +23,28 @@
 	...
 	cmdline.default	= noapic
 	cmdline.0	= noapic pci=noirq
+
+* console
+
+  [optional]
+
+  If defined and not equal to 'default', the value of this directive (prefixed
+  with "console=") is substituted to %CONSOLE% in the PXE configuration file.
+  A default value can be defined in the [private] zone declaration.
+
+  Sample use :
+
+    To have a serial console by default :
+
+    [private]
+	...
+	console = ttyS0,115200n8
+
+    To cancel the serial console for host host01 :
+
+    [host%%]
+	...
+	console.1 = default
 
 * pxetemplate
 

Modified: trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pf-tools/trunk/debian/changelog?rev=561&op=diff
==============================================================================
--- trunk/debian/changelog (original)
+++ trunk/debian/changelog Fri Jan 18 15:27:46 2008
@@ -12,6 +12,7 @@
   * extracting Mk_pxelinuxcfg from Net.pm to mk_pxelinuxcfg tool and exporting some
     functions which are needed for mk_pxelinuxcfg
   * function Load_conf from Conf.pm now supports "use strict"
+  * forward port console parameter from "0.32-stable" branch
 
   [ Thomas Parmelan ]
   * lib-net: if no comment is specified in a zone, network or server
@@ -22,7 +23,7 @@
     made mistakes...
   * Update my email address.
 
- -- Christophe Caillet <quadchris at free.fr>  Fri, 18 Jan 2008 12:31:13 +0100
+ -- Christophe Caillet <quadchris at free.fr>  Fri, 18 Jan 2008 16:24:19 +0100
 
 pf-tools (0.32.46-1) unstable; urgency=low
 

Modified: trunk/lib/PFTools/Conf.pm
URL: http://svn.debian.org/wsvn/pf-tools/trunk/lib/PFTools/Conf.pm?rev=561&op=diff
==============================================================================
--- trunk/lib/PFTools/Conf.pm (original)
+++ trunk/lib/PFTools/Conf.pm Fri Jan 18 15:27:46 2008
@@ -37,6 +37,10 @@
     deferredlogsystem
     deferredlogpipe
     FlushLog
+    Abort
+    Warn
+    Debug
+    Log
 );
 
 our @EXPORT_OK = qw();

Modified: trunk/lib/PFTools/Net.pm
URL: http://svn.debian.org/wsvn/pf-tools/trunk/lib/PFTools/Net.pm?rev=561&op=diff
==============================================================================
--- trunk/lib/PFTools/Net.pm (original)
+++ trunk/lib/PFTools/Net.pm Fri Jan 18 15:27:46 2008
@@ -34,6 +34,7 @@
 
     Get_Active_Filename
     Get_dns_from_hostname
+    Get_Ramdisk_size_from_Initrd
     Get_If
     Resolv
 
@@ -1320,6 +1321,9 @@
 	@{ $Z->{SOA}->{'dhcpvlan'} } = @DEFAULTDHCPVLAN;
     }
 
+    if ( $S->{console} and $S->{console} ne 'default') {
+        $Z->{SOA}->{console} = $S->{console};
+    }
     # Ajout des champs NS
     foreach $c ( sort ( keys %{ $S->{'ns'} } ) ) {
 	push( @{ $Z->{'NS'} }, $S->{'ns'}->{$c} );
@@ -1565,6 +1569,10 @@
 			if ( $M->{'cmdline'} ) {
 			    printf qq{# cmdline "%s";\n}, $M->{'cmdline'};
 			}
+
+                        if ( $M->{console} ) {
+                            printf qq{# console "%s";\n}, $M->{console};
+                        }
 
 			if ( defined( $M->{'pxefilename'} )
 			    && $M->{'pxefilename'} ne "" )

Modified: trunk/sbin/mk_pxelinuxcfg
URL: http://svn.debian.org/wsvn/pf-tools/trunk/sbin/mk_pxelinuxcfg?rev=561&op=diff
==============================================================================
--- trunk/sbin/mk_pxelinuxcfg (original)
+++ trunk/sbin/mk_pxelinuxcfg Fri Jan 18 15:27:46 2008
@@ -26,6 +26,7 @@
 
 use PFTools::Net;
 use PFTools::Update;
+use Data::Dumper ;
 
 sub Mk_pxe_bootfile ($;$) {
 	my ( $Z, $default_template ) = @_;
@@ -34,7 +35,7 @@
 	my $templates = {};
 
 	my $pxelinuxconfdir = dirname ( $default_template );
-	open TPL, $default_template)
+	open (TPL, $default_template)
 	    or die "Unable to open $default_template: $!\n";
 	@{ $templates->{$default_template} } = <TPL>;
 	close TPL;
@@ -98,7 +99,8 @@
 
 							$temptemplatecontent =~ s/%KERNEL%/$M->{pxefilename}/gs;
 							$temptemplatecontent =~ s/%INITRD%/$M->{initrd}/gs;
- 							my $ramdisk_size = Get_Ramdisk_size_from_Initrd($M->{'initrd'} );
+#  							my $ramdisk_size = Get_Ramdisk_size_from_Initrd($M->{'initrd'} );
+							my $ramdisk_size = 10240 ;
 							$temptemplatecontent =~ s/%RAMDISK_SIZE%/$ramdisk_size/gs;
 							my $console = $M->{'console'} || '';
 							$console = "console=" . $console if $console;




More information about the pf-tools-commits mailing list