Package: mrtg-rrd Version: 0.7-5 Severity: normal Tags: patch Dear Maintainer,
I found a bug on mrtg-rrd that doesn't allows me to use the * wildcard on the Include option of mrtg.cfg file. I have several mrtg cfg files on a given directory and I include them by using the following option on mrtg.cfg file: Include: /etc/mrtg/*.cfg This way I don't need to enumerate each config file on the main config file. Using this valid option on MRTG, breaks mrtg-rrd perl script, because it doesn't considerates '*' for the Include sentence. I fixed it by taking into account the '*' on the Include. I bring this patch in order to help others to cope this problem. Hope it helps: --- mrtg-rrd-old.cgi 2014-10-02 14:10:29.092070646 -0300 +++ mrtg-rrd.cgi 2014-10-02 14:15:34.300084200 -0300 @@ -837,7 +837,15 @@ next; } elsif (/^Include\s*:\s*(\S*)$/) { push @all_config_files, $1; - read_mrtg_config($1, $def, $cfgref, $order); + if(index($1, "*") != -1) { + my @files = glob($1) or die "Bad Include format on mrtg.cfg file"; + foreach my $file (@files) { + read_mrtg_config($file, $def, $cfgref, $order); + } + } + else { + read_mrtg_config($1, $def, $cfgref, $order); + } next; } elsif (/^([\w\d]+)\s*:\s*(\S.*)$/) { my ($opt, $val) = (lc($1), $2); Regards, Victor -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org