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

Comparing projects/cms/source/host/ihost-perl/plugins/perl/i-scream_users.pl (file contents):
Revision 1.1 by tdb, Mon Nov 19 21:42:11 2001 UTC vs.
Revision 1.4 by tdb, Tue May 21 16:47:12 2002 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines