ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/host/ihost-perl/plugins/perl/i-scream_uptime.pl
(Generate patch)

Comparing projects/cms/source/host/ihost-perl/plugins/perl/i-scream_uptime.pl (file contents):
Revision 1.1 by tdb, Mon Nov 19 21:42:11 2001 UTC vs.
Revision 1.2 by tdb, Tue Dec 18 04:07:17 2001 UTC

# Line 15 | Line 15 | $| = 1;
15   # You'd be silly not to use this ;)
16   use strict;
17  
18 < # Have to hope this will work really.
19 < my($ostype) = `uname -s`; chomp($ostype);
18 > # Get the OS type from the args, or try towork it out
19 > my($ostype) = $ARGV[0];
20 > $ostype = `uname -s` if not defined $ostype;
21 > chomp($ostype);
22  
23   # Decide which paths we should use.
24   my($uptimebin);
# Line 34 | Line 36 | else {
36   }
37  
38   # Run the following components: -
37 &print_ident();
39   &include_uptime();
40  
41   # End the program normally.
# Line 42 | Line 43 | exit(0);
43  
44  
45  
45
46 # prints out an identifier for this version of the script
47 # this could be used in checks further downstream
48 sub print_ident() {
49    print 'packet.plugins.ident.i-scream_uptime i-scream_uptime.pl $Revision$';
50    print "\n";
51 }
46  
47   # sub to print pairs of data, separated by a single space character.
48   # If the second argument is undefined, then the pair is still printed,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines