pf-tools commit: r606 [ccaillet-guest] - in /trunk: debian/changelog sbin/mk_pxelinuxcfg
parmelan-guest at users.alioth.debian.org
parmelan-guest at users.alioth.debian.org
Fri Jul 11 14:20:18 UTC 2008
Author: ccaillet-guest
Date: Fri Jul 11 14:20:18 2008
New Revision: 606
URL: http://svn.debian.org/wsvn/pf-tools/?sc=1&rev=606
Log:
fix on mk_pxelinux for setting $debian_installer var
Modified:
trunk/debian/changelog
trunk/sbin/mk_pxelinuxcfg
Modified: trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pf-tools/trunk/debian/changelog?rev=606&op=diff
==============================================================================
--- trunk/debian/changelog (original)
+++ trunk/debian/changelog Fri Jul 11 14:20:18 2008
@@ -7,8 +7,9 @@
* 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
+ * fix on mk_pxelinux for setting $debian_installer var
+
+ -- Christophe Caillet <tof at sitadelle.com> Fri, 11 Jul 2008 16:19:46 +0200
pf-tools (0.33-0WIP2) unstable; urgency=low
Modified: trunk/sbin/mk_pxelinuxcfg
URL: http://svn.debian.org/wsvn/pf-tools/trunk/sbin/mk_pxelinuxcfg?rev=606&op=diff
==============================================================================
--- trunk/sbin/mk_pxelinuxcfg (original)
+++ trunk/sbin/mk_pxelinuxcfg Fri Jul 11 14:20:18 2008
@@ -120,9 +120,9 @@
foreach my $m ( sort ( keys %{ $host->{'SRVLIST'} } ) ) {
my $nam;
my $M = $host->{'SRVLIST'}->{$m};
- my $debian_installer ;
- ( defined $M->{'deploymode'} && $M->{'deploymode'} eq 'debian-installer' ) ? $debian_installer = 1 : $debian_installer = 0 ;
-
+ my $debian_installer = 0 ;
+ $debian_installer = 1 if ( defined $M->{'deploymode'} && $M->{'deploymode'} eq 'debian-installer' ) ;
+ print "|$M->{'deploymode'}| debian_installer --> $debian_installer for host $m\n" ;
foreach $nam ( sort ( keys %{ $M->{'zone'} } ) ) {
if ( $nam =~ /$dhcpvlanregex/ ) {
my $nam2 = $1;
@@ -156,9 +156,16 @@
. $pxelinuxconfdir . "/"
. $hexaddr . ": "
. $!;
-
- my $template_name = $M->{'pxetemplate'} ? $M->{'pxetemplate'} : $default_template;
- $debian_installer = 1 if ( $template_name eq 'debian-installer' ) ;
+
+ my $template_name ;
+ if ( $debian_installer ) {
+ print "$m is on debian-installer mode\n" ;
+ $template_name = $M->{'deploymode'} ;
+ }
+ else {
+ $template_name = $M->{'pxetemplate'} ? $M->{'pxetemplate'} : $default_template;
+ }
+
unless (defined $templates->{$template_name}) {
my $tpl = ( ($template_name =~ m/^\//) ? '' : "$pxelinuxconfdir/" )
. $template_name;
More information about the pf-tools-commits
mailing list