projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-4.4'
[collectd.git]
/
contrib
/
cussh.pl
diff --git
a/contrib/cussh.pl
b/contrib/cussh.pl
index
48f5e93
..
23a9078
100755
(executable)
--- a/
contrib/cussh.pl
+++ b/
contrib/cussh.pl
@@
-113,7
+113,7
@@
sub getid {
print $$string . $/;
my ($h, $p, $pi, $t, $ti) =
print $$string . $/;
my ($h, $p, $pi, $t, $ti) =
- $$string =~ m
/^(\w+)\/(\w+)(?:-(\w+))?\/(\w+)(?:-(\w+))?\s*/
;
+ $$string =~ m
#^([^/]+)/([^/-]+)(?:-([^/]+))?/([^/-]+)(?:-([^/]+))?\s*#
;
$$string = $';
return if ((! $h) || (! $p) || (! $t));
$$string = $';
return if ((! $h) || (! $p) || (! $t));
@@
-122,8
+122,8
@@
sub getid {
($id{'host'}, $id{'plugin'}, $id{'type'}) = ($h, $p, $t);
($id{'host'}, $id{'plugin'}, $id{'type'}) = ($h, $p, $t);
- $id{'plugin_instance'} = $pi if ($pi);
- $id{'type_instance'} = $ti if ($ti);
+ $id{'plugin_instance'} = $pi if
defined
($pi);
+ $id{'type_instance'} = $ti if
defined
($ti);
return \%id;
}
return \%id;
}