pf-tools/pf-tools: translation of the template sections
parmelan-guest at users.alioth.debian.org
parmelan-guest at users.alioth.debian.org
Fri Apr 25 09:52:42 UTC 2014
details: http://hg.debian.org/hg/pf-tools/pf-tools/rev/025400ebe4f6
changeset: 1276:025400ebe4f6
user: shad
date: Fri Apr 25 11:52:34 2014 +0200
description:
translation of the template sections
diffstat:
TODO | 2 ++
lib/PFTools/Compat/Translation.pm | 7 +++++++
tools/Translate_old_config | 4 ++++
3 files changed, 13 insertions(+), 0 deletions(-)
diffs (43 lines):
diff -r 83fda81d97e4 -r 025400ebe4f6 TODO
--- a/TODO Tue Apr 15 17:03:30 2014 +0200
+++ b/TODO Fri Apr 25 11:52:34 2014 +0200
@@ -1,6 +1,8 @@
/--Priority: Low/Medium/Urgent
|/-Difficulty: Easy/Medium/Hard
||
+UM adding true on_install
+UM dont force ip on deployment vlan and use dhcp (will facilitate VM)
UM adding handlers for bridge interface on hostfile definitions
LH implementing udev rules for naming iface accordingly with hostfile
definition if a key mac is defined for the specified hostname
diff -r 83fda81d97e4 -r 025400ebe4f6 lib/PFTools/Compat/Translation.pm
--- a/lib/PFTools/Compat/Translation.pm Tue Apr 15 17:03:30 2014 +0200
+++ b/lib/PFTools/Compat/Translation.pm Fri Apr 25 11:52:34 2014 +0200
@@ -44,6 +44,13 @@
$new_conf->{$1} = { 'type' => 'include' };
delete $new_conf->{$section};
next;
+ } elsif ( $section =~ m{\A /distrib/tftpboot/pxelinux.cfg/(.*) \z}xms ) {
+ my $new_section = qq{/usr/share/pf-tools/templates/$1};
+ $new_conf->{$new_section} = delete $new_conf->{$section};
+ if ( $new_conf->{$new_section}->{depends} =~ m{\A /distrib/tftpboot/pxelinux.cfg/(.*) \z}xms ) {
+ $new_conf->{$new_section}->{depends} = qq{/usr/share/pf-tools/templates/$1};
+ }
+ $section = $new_section;
}
foreach my $key ( keys %{ $new_conf->{$section} } ) {
diff -r 83fda81d97e4 -r 025400ebe4f6 tools/Translate_old_config
--- a/tools/Translate_old_config Tue Apr 15 17:03:30 2014 +0200
+++ b/tools/Translate_old_config Fri Apr 25 11:52:34 2014 +0200
@@ -107,6 +107,10 @@
$current_section = $1;
$sectionorder{$current_section} = $sectionnumber;
$sectionorder{"__$current_section"} = $sectionnumber;
+ if ( $current_section =~ m{\A /distrib/tftpboot/pxelinux.cfg/(.*) \z}xms ) {
+ $current_section = qq{/usr/share/pf-tools/templates/$1};
+ $sectionorder{$current_section} = $sectionnumber;
+ }
$sectionnumber++;
if (@tempcomment) {
@{ $comments->{$current_section}->{'general'} } = @tempcomment;
More information about the pf-tools-commits
mailing list