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_osver.pl
(Generate patch)

Comparing projects/cms/source/host/ihost-perl/plugins/perl/i-scream_osver.pl (file contents):
Revision 1.1 by tdb, Mon Nov 19 21:42:11 2001 UTC vs.
Revision 1.3 by tdb, Sat May 18 18:15:57 2002 UTC

# Line 1 | Line 1
1   #!/usr/bin/perl -w
2  
3 + #
4 + # i-scream central monitoring system
5 + # Copyright (C) 2000-2002 i-scream
6 + #
7 + # This program is free software; you can redistribute it and/or
8 + # modify it under the terms of the GNU General Public License
9 + # as published by the Free Software Foundation; either version 2
10 + # of the License, or (at your option) any later version.
11 + #
12 + # This program is distributed in the hope that it will be useful,
13 + # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 + # GNU General Public License for more details.
16 + #
17 + # You should have received a copy of the GNU General Public License
18 + # along with this program; if not, write to the Free Software
19 + # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
20 + #
21 +
22   #-----------------------------------------------------------------
23   # i-scream host plugin - os details and version
24   #     $Author$
# Line 15 | Line 34 | $| = 1;
34   # You'd be silly not to use this ;)
35   use strict;
36  
37 < # Have to hope this will work really.
38 < my($ostype) = `uname -s`; chomp($ostype);
37 > # Get the OS type from the args, or try towork it out
38 > my($ostype) = $ARGV[0];
39 > $ostype = `uname -s` if not defined $ostype;
40 > chomp($ostype);
41  
42   # Decide which paths we should use.
43   my($unamebin);
# Line 37 | Line 58 | else {
58   }
59  
60   # Run the following components: -
40 &print_ident();
61   &include_osver();
62  
63   # End the program normally.
# Line 45 | Line 65 | exit(0);
65  
66  
67  
48
49 # prints out an identifier for this version of the script
50 # this could be used in checks further downstream
51 sub print_ident() {
52    print 'packet.plugins.ident.i-scream_osver i-scream_osver.pl $Revision$';
53    print "\n";
54 }
68  
69   # sub to print pairs of data, separated by a single space character.
70   # If the second argument is undefined, then the pair is still printed,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines