pf-tools commit: r750 [ccaillet-guest] - in /branches/0.33-stable: debian/changelog sbin/mk_pxelinuxcfg
parmelan-guest at users.alioth.debian.org
parmelan-guest at users.alioth.debian.org
Tue Jun 8 07:56:36 UTC 2010
Author: ccaillet-guest
Date: Tue Jun 8 07:56:27 2010
New Revision: 750
URL: http://svn.debian.org/wsvn/pf-tools/?sc=1&rev=750
Log:
* sbin/mk_pxelinuxcfg :
- use specific templates for ubuntu distros
- improve function for handling ubuntu kernel standard name
Modified:
branches/0.33-stable/debian/changelog
branches/0.33-stable/sbin/mk_pxelinuxcfg
Modified: branches/0.33-stable/debian/changelog
URL: http://svn.debian.org/wsvn/pf-tools/branches/0.33-stable/debian/changelog?rev=750&op=diff
==============================================================================
--- branches/0.33-stable/debian/changelog (original)
+++ branches/0.33-stable/debian/changelog Tue Jun 8 07:56:27 2010
@@ -7,7 +7,9 @@
is commented, waiting for activation if needed.
- in Add_Server : adding the possibility for "undefining" an interface for
a particular numbered host with the special value "NONE"
- * sbin/mk_pxelinuxcfg : use specific templates for ubuntu distros
+ * sbin/mk_pxelinuxcfg :
+ - use specific templates for ubuntu distros
+ - improve function for handling ubuntu kernel standard name
* sbin/mk_grub2opt : small fix on cmdline substitution
* sbin/mk_sourceslist : use specific templates for ubuntu distros
* adding ubuntu specific templates for PXE, preseed and sources.list files
@@ -27,7 +29,7 @@
cmdline defined into host definition
* debian/control : fixing deps for libmd5-perl which is included in perl >= 5.10
- -- Christophe Caillet <quadchris at free.fr> Fri, 04 Jun 2010 17:22:54 +0200
+ -- Christophe Caillet <tof at sitadelle.com> Tue, 08 Jun 2010 09:55:14 +0200
pf-tools (0.33.19-1) unstable; urgency=low
Modified: branches/0.33-stable/sbin/mk_pxelinuxcfg
URL: http://svn.debian.org/wsvn/pf-tools/branches/0.33-stable/sbin/mk_pxelinuxcfg?rev=750&op=diff
==============================================================================
--- branches/0.33-stable/sbin/mk_pxelinuxcfg (original)
+++ branches/0.33-stable/sbin/mk_pxelinuxcfg Tue Jun 8 07:56:27 2010
@@ -45,16 +45,22 @@
my $TPL_UBUNTU_PRESEED = "/usr/share/pf-tools/templates/ubuntu-preseed.tpl" ;
my $DEFAULT_PRESEED = $PRESEED_REPOS."/default_preseed.txt" ;
-sub Get_kpkg_from_pxefilename ($) {
- my ( $pxefilename ) = @_ ;
-
- if ( $pxefilename =~ /pxe/ ) {
- my ( $vm, $type, $pxe, $version, @append ) = split ( /-/, $pxefilename ) ;
- return "linux-image-".$version."-".$type."-".join ( "-", @append )."-grsec" ;
+sub Get_kpkg_from_pxefilename ($$) {
+ my ( $pxefilename, $deploymode ) = @_ ;
+
+ if ( $deploymode =~ /^ubuntu/ ) {
+ $pxefilename =~ /^vmlinuz-([.]+)$/;
+ return "linux-image-".$1;
}
else {
- my ( $vm, $version, $type, $append_version ) = split ( /-/, $pxefilename ) ;
- return "linux-image-".$version."-".$type."-".$append_version."-grsec" ;
+ if ( $pxefilename =~ /pxe/ ) {
+ my ( $vm, $type, $pxe, $version, @append ) = split ( /-/, $pxefilename ) ;
+ return "linux-image-".$version."-".$type."-".join ( "-", @append )."-grsec" ;
+ }
+ else {
+ my ( $vm, $version, $type, $append_version ) = split ( /-/, $pxefilename ) ;
+ return "linux-image-".$version."-".$type."-".$append_version."-grsec" ;
+ }
}
}
@@ -67,7 +73,7 @@
}
my $preseed_content = join '', <PRESEED_TPL> ;
close ( PRESEED_TPL ) ;
- my $deb_kernel = Get_kpkg_from_pxefilename ( $ref_srv->{'pxefilename'} ) ;
+ my $deb_kernel = Get_kpkg_from_pxefilename ( $ref_srv->{'pxefilename'}, $ref_srv->{'deploymode'} ) ;
$preseed_content =~ s/%KERNELPKG%/$deb_kernel/gs ;
my $distrib = $ref_srv->{'distrib'} ;
More information about the pf-tools-commits
mailing list