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

parmelan-guest at users.alioth.debian.org parmelan-guest at users.alioth.debian.org
Fri Jan 18 14:32:53 UTC 2008


Author: ccaillet-guest
Date: Fri Jan 18 14:32:42 2008
New Revision: 560

URL: http://svn.debian.org/wsvn/pf-tools/?sc=1&rev=560
Log:
Copy/paste ... it is bad

Modified:
    trunk/lib/PFTools/Net.pm
    trunk/sbin/mk_pxelinuxcfg

Modified: trunk/lib/PFTools/Net.pm
URL: http://svn.debian.org/wsvn/pf-tools/trunk/lib/PFTools/Net.pm?rev=560&op=diff
==============================================================================
--- trunk/lib/PFTools/Net.pm (original)
+++ trunk/lib/PFTools/Net.pm Fri Jan 18 14:32:42 2008
@@ -996,6 +996,17 @@
 	    elsif ( defined( $S->{'cmdline'}->{'default'} ) ) {
 		$M->{'cmdline'} = $S->{'cmdline'}->{'default'};
 	    }
+
+            if ( defined( $S->{'console'}->{$mnamindexnum} ) ) {
+                $M->{'console'} = $S->{'console'}->{$mnamindexnum};
+            }
+            elsif ( defined( $S->{'console'}->{'default'} ) ) {
+                $M->{'console'} = $S->{'console'}->{'default'};
+            }
+            elsif ( defined $Z->{'SOA'}->{'console'} ) {
+                $M->{'console'} = $Z->{'SOA'}->{'console'};
+            }
+            delete $M->{'console'} if $M->{'console'} and $M->{'console'} eq 'default';
 
 	    # vrrp?
 	    my $vrrp;

Modified: trunk/sbin/mk_pxelinuxcfg
URL: http://svn.debian.org/wsvn/pf-tools/trunk/sbin/mk_pxelinuxcfg?rev=560&op=diff
==============================================================================
--- trunk/sbin/mk_pxelinuxcfg (original)
+++ trunk/sbin/mk_pxelinuxcfg Fri Jan 18 14:32:42 2008
@@ -100,6 +100,9 @@
 							$temptemplatecontent =~ s/%INITRD%/$M->{initrd}/gs;
  							my $ramdisk_size = Get_Ramdisk_size_from_Initrd($M->{'initrd'} );
 							$temptemplatecontent =~ s/%RAMDISK_SIZE%/$ramdisk_size/gs;
+							my $console = $M->{'console'} || '';
+							$console = "console=" . $console if $console;
+							$temptemplatecontent =~ s/%CONSOLE%/$console/gs;
 							my $cmdline = $M->{'cmdline'} || '';
 							$temptemplatecontent =~ s/%CMDLINE%/$cmdline/gs;
 							print PXELINUXCFG $temptemplatecontent;




More information about the pf-tools-commits mailing list