Correct interface logic of uptime(1) formatting script.

Sat, 04 Apr 2009 23:05:27 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 04 Apr 2009 23:05:27 +0200
changeset 138
3603322c3b20
parent 137
b97469b9f728
child 139
d3e0f51e3821

Correct interface logic of uptime(1) formatting script.

mrtg/uptime.pl file | annotate | diff | comparison | revisions
     1.1 --- a/mrtg/uptime.pl	Sat Apr 04 22:53:22 2009 +0200
     1.2 +++ b/mrtg/uptime.pl	Sat Apr 04 23:05:27 2009 +0200
     1.3 @@ -3,12 +3,14 @@
     1.4  ##  uptime.pl: provide formatted uptime(1) information
     1.5  ##
     1.6  
     1.7 -$ZERO = 0;
     1.8 +$null = 0;
     1.9  $uptime = `uptime`;
    1.10 +$hostname = `hostname`;
    1.11  
    1.12  $uptime =~ /up (.*?) day/;
    1.13  $up = int($1);
    1.14 -$hostname = `hostname`;
    1.15  
    1.16 -print "$ZERO\n$up\n"
    1.17 +print "$up\n";
    1.18 +print "$up\n";
    1.19 +print "$null\n";
    1.20  

mercurial