| 18 |
|
# You'd be silly not to use this ;) |
| 19 |
|
use strict; |
| 20 |
|
|
| 21 |
< |
# Have to hope this will work really. |
| 22 |
< |
my($ostype) = `uname -s`; chomp($ostype); |
| 21 |
> |
# Get the OS type from the args, or try towork it out |
| 22 |
> |
my($ostype) = $ARGV[0]; |
| 23 |
> |
$ostype = `uname -s` if not defined $ostype; |
| 24 |
> |
chomp($ostype); |
| 25 |
|
|
| 26 |
|
# Decide which paths we should use. |
| 27 |
|
my($topbin); |
| 47 |
|
} |
| 48 |
|
|
| 49 |
|
# Run the following components: - |
| 48 |
– |
&print_ident(); |
| 50 |
|
&include_top(); |
| 51 |
|
|
| 52 |
|
# End the program normally. |
| 54 |
|
|
| 55 |
|
|
| 56 |
|
|
| 56 |
– |
|
| 57 |
– |
# prints out an identifier for this version of the script |
| 58 |
– |
# this could be used in checks further downstream |
| 59 |
– |
sub print_ident() { |
| 60 |
– |
print 'packet.plugins.ident.i-scream_top i-scream_top.pl $Revision$'; |
| 61 |
– |
print "\n"; |
| 62 |
– |
} |
| 57 |
|
|
| 58 |
|
# sub to print pairs of data, separated by a single space character. |
| 59 |
|
# If the second argument is undefined, then the pair is still printed, |