pf-tools commit: r596 [ccaillet-guest] - in /trunk: debian/changelog sbin/mk_pxelinuxcfg templates/debian-installer.pxe
parmelan-guest at users.alioth.debian.org
parmelan-guest at users.alioth.debian.org
Wed May 28 11:36:15 UTC 2008
Author: ccaillet-guest
Date: Wed May 28 11:36:14 2008
New Revision: 596
URL: http://svn.debian.org/wsvn/pf-tools/?sc=1&rev=596
Log:
Adding another param for command mk_pxelinuxcfg tool : TFTP_DIR which
define where the PXE files will be stored if not defined the tool act as
before : use for PXE files the directory where default template is stored
Modified:
trunk/debian/changelog
trunk/sbin/mk_pxelinuxcfg
trunk/templates/debian-installer.pxe
Modified: trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pf-tools/trunk/debian/changelog?rev=596&op=diff
==============================================================================
--- trunk/debian/changelog (original)
+++ trunk/debian/changelog Wed May 28 11:36:14 2008
@@ -52,6 +52,9 @@
what is used for virtualization
* Adding commands when creating primary bridge on Bridge.pm (miscallenous
settings on bridge and options on $ETHTRUNK
+ * Adding another param for command mk_pxelinuxcfg tool : TFTP_DIR which
+ define where the PXE files will be stored if not defined the tool act as
+ before : use for PXE files the directory where default template is stored
[ Thomas Parmelan ]
* lib-net: if no comment is specified in a zone, network or server
@@ -64,7 +67,7 @@
* Merge the remaining changes from 0.32.47-1 and 0.32.48-1.
* Bugfix for hosts without shortname definition.
- -- Christophe Caillet <quadchris at free.fr> Tue, 29 Apr 2008 16:14:59 +0200
+ -- Christophe Caillet <quadchris at free.fr> Wed, 28 May 2008 13:26:47 +0200
pf-tools (0.32.48-1) unstable; urgency=low
Modified: trunk/sbin/mk_pxelinuxcfg
URL: http://svn.debian.org/wsvn/pf-tools/trunk/sbin/mk_pxelinuxcfg?rev=596&op=diff
==============================================================================
--- trunk/sbin/mk_pxelinuxcfg (original)
+++ trunk/sbin/mk_pxelinuxcfg Wed May 28 11:36:14 2008
@@ -40,13 +40,14 @@
return $md5->hexdigest;
}
-sub Mk_pxe_bootfile ($;$) {
- my ( $Z, $default_template ) = @_;
+sub Mk_pxe_bootfile ($;$$) {
+ my ( $Z, $default_template, $tftp_dir ) = @_;
my $oldout;
my $s;
my $templates = {};
my $pxelinuxconfdir = dirname ( $default_template );
+ my $pxetftpdir = $tftp_dir || dirname ( $default_template );
open TPL, $default_template
or die "Unable to open $default_template: $!\n";
@{ $templates->{$default_template} } = <TPL>;
@@ -88,12 +89,12 @@
my $hexaddr = sprintf( '%02X%02X%02X%02X',
split( '\.', $addr ) );
- if ( -e $pxelinuxconfdir . "/" . $hexaddr ) {
- unlink( $pxelinuxconfdir . "/" . $hexaddr );
+ if ( -e $pxetftpdir . "/" . $hexaddr ) {
+ unlink( $pxetftpdir . "/" . $hexaddr );
}
open( PXELINUXCFG,
- ">" . $pxelinuxconfdir . "/" . $hexaddr )
+ ">" . $pxetftpdir . "/" . $hexaddr )
|| die "impossible d'ecrire "
. $pxelinuxconfdir . "/"
. $hexaddr . ": "
@@ -131,6 +132,9 @@
$console = "console=" . $console if $console;
$temptemplatecontent =~ s/%CONSOLE%/$console/gs;
+ my $serial_speed = $M->{'serialspeed'} || '115200' ;
+ $temptemplatecontent =~ s/%SERIAL_SPEED%/$serial_speed/gs;
+
$temptemplatecontent =~ s/ +/ /gs;
print PXELINUXCFG $temptemplatecontent;
@@ -143,10 +147,10 @@
}
}
-my ( $SRC, $TEMPLATE ) = @ARGV ;
+my ( $SRC, $TEMPLATE, $TFTP_DIR ) = @ARGV ;
unless ( $SRC && $TEMPLATE ) {
warn "Usage: $0 src template\n";
die "\t(confs will be written do template's dirname)\n";
}
-Mk_pxe_bootfile ( Init_lib_net ( Get_source ( $SRC ) ), Get_source ( $TEMPLATE ) ) ;
+Mk_pxe_bootfile ( Init_lib_net ( Get_source ( $SRC ) ), Get_source ( $TEMPLATE ), $TFTP_DIR ) ;
Modified: trunk/templates/debian-installer.pxe
URL: http://svn.debian.org/wsvn/pf-tools/trunk/templates/debian-installer.pxe?rev=596&op=diff
==============================================================================
--- trunk/templates/debian-installer.pxe (original)
+++ trunk/templates/debian-installer.pxe Wed May 28 11:36:14 2008
@@ -9,7 +9,7 @@
LABEL linux
kernel %KERNEL%
- append vga=normal root=/dev/sda3 -- console=ttyS0,%SERIAL_SPEED%n8 %CMDLINE%
+ append vga=normal root=/dev/sda3 -- %CONSOLE% %CMDLINE%
PROMPT 1
TIMEOUT 100
More information about the pf-tools-commits
mailing list