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

Fix issue with $uptime being undefined

Fix issue with $uptime being undefined.
On my setup perl requires a variable to assign the return value of the split operation. Without this the value of $uptime ends up being undefined.
This commit is contained in:
Stephan 2014-07-16 23:52:03 +02:00
parent c43dc4b9a2
commit fa5458e1aa

View file

@ -208,8 +208,8 @@ sub uptime {
my $puptime = "/proc/uptime";
open( TIME, "<", $puptime ) || die "Unable to read $puptime: $!";
while (<TIME>) {
split;
$uptime = @_[0];
my @arr = split;
$uptime = $arr[0];
}
close(TIME);
chomp $uptime;