mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
parent
23d890cd59
commit
c4c73eae4c
@ -160,6 +160,9 @@ sub do_collect {
|
||||
|
||||
foreach my $line (split(/\n/, `$fsget` )) {
|
||||
my ($name, $key, $value, undef ) = (split(/\t/,$line));
|
||||
# try to preserve underscores:
|
||||
# * duplicate existing ones
|
||||
# * afterwards replace slashs with single ones
|
||||
($name =~ s/_/__/g);
|
||||
($name =~ s/\//_/g);
|
||||
$filesystems->{$name}->{$key}=$value;
|
||||
@ -170,6 +173,9 @@ sub do_collect {
|
||||
sub do_config_fs {
|
||||
my ($fs) = @_;
|
||||
my $fs_slash = ($fs);
|
||||
# try to restore underscores (see "do_collect" for the reverse operation):
|
||||
# * substitute all underscores with slashs
|
||||
# * afterwards transform *double* slashs back into a single underscore
|
||||
($fs_slash =~ s/_/\//g);
|
||||
($fs_slash =~ s/\/\//_/g);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user