1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-24 18:07:20 +00:00

Whitespace cleanup

* remove trailing whitespace
* remove empty lines at the end of files
This commit is contained in:
Lars Kruse 2018-08-02 02:03:42 +02:00
parent ef851f0c34
commit 17f784270a
604 changed files with 2927 additions and 2945 deletions

View file

@ -29,7 +29,7 @@
#
# Change log
# v1.0.0 2008-07-21 Chris Hastie
# initial release
# initial release
# v1.0.1 2009-06-05 Tony Hoyle
# ipv6 support. Remove dns lookups.
#
@ -75,7 +75,7 @@ open(SERVICE, "$COMMAND |")
while (<SERVICE>) {
if(/^\s*\d+\s+(\d+)\s+/) {
my ($name, $offset) = &lookupip($1);
$peers{$name} = $offset;
$peers{$name} = $offset;
}
}
close(SERVICE);
@ -106,12 +106,12 @@ foreach my $peer (keys %peers) {
# create a valid munin field name from the hostname
sub sanitize_field () {
my $field = shift;
# replace illegal characters with an underscore
$field =~ s/[^A-Za-z0-9_]/_/g;
# prepend an underscore if name starts with a number
$field =~ s/^([^A-Za-z_])/_$1/;
# truncate to 19 characters
if (length($field) > 19) {
$field = substr($field, 0, 19);