diff --git a/plugins/zfs/zfs_usage_ b/plugins/zfs/zfs_usage_ index fdd5b3a9..e44caf12 100755 --- a/plugins/zfs/zfs_usage_ +++ b/plugins/zfs/zfs_usage_ @@ -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);