pf-tools/pf-tools: better path for the include
parmelan-guest at users.alioth.debian.org
parmelan-guest at users.alioth.debian.org
Thu Apr 10 12:29:02 UTC 2014
details: http://hg.debian.org/hg/pf-tools/pf-tools/rev/932925395a3d
changeset: 1266:932925395a3d
user: shad
date: Thu Apr 10 14:28:58 2014 +0200
description:
better path for the include
diffstat:
tools/Translate_old_config | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diffs (36 lines):
diff -r 8eba26572ee4 -r 932925395a3d tools/Translate_old_config
--- a/tools/Translate_old_config Thu Apr 10 13:54:25 2014 +0200
+++ b/tools/Translate_old_config Thu Apr 10 14:28:58 2014 +0200
@@ -114,8 +114,13 @@
}
}
elsif ( $_ =~ m{\A \@include [ ] (.*) }msx ) {
- $current_section = $1;
- $sectionorder{"include-$current_section"} = $sectionnumber;
+ if ( $options->{'site'} eq q{UNDEFINED} ) {
+ $current_section = qq{COMMON:/include-$1};
+ }
+ else {
+ $current_section = qq{CONFSITE_$options->{'site'}:/include-$1};
+ }
+ $sectionorder{"$current_section"} = $sectionnumber;
$sectionnumber++;
if (@tempcomment) {
@{ $comments->{$current_section}->{'general'} } = @tempcomment;
@@ -149,7 +154,15 @@
else {
foreach my $section ( keys %{$old_parsing} ) {
if ( $section =~ m{\A @ (.*) \z}msx ) {
- $trans->{$1} = { 'type' => 'include' };
+ my $current_section;
+ if ( $options->{'site'} eq q{UNDEFINED} ) {
+ $current_section = qq{COMMON:/$1};
+ }
+ else {
+ $current_section = qq{CONFSITE_$options->{'site'}:/$1};
+ }
+
+ $trans->{$current_section} = { 'type' => 'include' };
}
elsif ( $old_parsing->{$section}->{'type'} eq 'network' ) {
$trans->{$section}
More information about the pf-tools-commits
mailing list