| 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($usersbin); |
| 39 |
|
} |
| 40 |
|
|
| 41 |
|
# Run the following components: - |
| 40 |
– |
&print_ident(); |
| 42 |
|
&include_users(); |
| 43 |
|
|
| 44 |
|
# End the program normally. |
| 46 |
|
|
| 47 |
|
|
| 48 |
|
|
| 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 |
– |
} |
| 49 |
|
|
| 50 |
|
# sub to print pairs of data, separated by a single space character. |
| 51 |
|
# If the second argument is undefined, then the pair is still printed, |