43 lines
1.8 KiB
Diff
43 lines
1.8 KiB
Diff
|
diff -up mrtg-2.17.4/bin/cfgmaker.orig mrtg-2.17.4/bin/cfgmaker
|
||
|
--- mrtg-2.17.4/bin/cfgmaker.orig 2015-09-07 13:12:23.960003553 +0200
|
||
|
+++ mrtg-2.17.4/bin/cfgmaker 2015-09-07 13:13:16.694253515 +0200
|
||
|
@@ -1369,22 +1369,23 @@ sub addrouter() {
|
||
|
# tenderly and populate the $$flags{}{} hashes accordingly.
|
||
|
for my $g (@{$$opt{"global"}}) {
|
||
|
my ($t,$fs);
|
||
|
- $g =~ /^options\[([_^\$])\]:\s*(.*)$/i;
|
||
|
- $t = $1;
|
||
|
- $fs = $2;
|
||
|
- $t =~ s/_/default/;
|
||
|
- $t =~ s/\^/prepend/;
|
||
|
- $t =~ s/\$/append/;
|
||
|
+ if ($g =~ /^options\[([_^\$])\]:\s*(.*)$/i) {
|
||
|
+ $t = $1;
|
||
|
+ $fs = $2;
|
||
|
+ $t =~ s/_/default/;
|
||
|
+ $t =~ s/\^/prepend/;
|
||
|
+ $t =~ s/\$/append/;
|
||
|
|
||
|
- # If a line like "options[X]:" is found clear
|
||
|
- # all flags for that category and then go to next
|
||
|
- # --global 'Options[..' line if any.
|
||
|
- if ($fs =~ /^\s*$/) {
|
||
|
- $$flags{$t} = {};
|
||
|
- next;
|
||
|
- } else {
|
||
|
- for my $f (split /\s*,\s*/,$fs) {
|
||
|
- $$flags{$t}{$f} = "set";
|
||
|
+ # If a line like "options[X]:" is found clear
|
||
|
+ # all flags for that category and then go to next
|
||
|
+ # --global 'Options[..' line if any.
|
||
|
+ if ($fs =~ /^\s*$/) {
|
||
|
+ $$flags{$t} = {};
|
||
|
+ next;
|
||
|
+ } else {
|
||
|
+ for my $f (split /\s*,\s*/,$fs) {
|
||
|
+ $$flags{$t}{$f} = "set";
|
||
|
+ }
|
||
|
}
|
||
|
}
|
||
|
}
|