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:
parent
c43dc4b9a2
commit
fa5458e1aa
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue