| 33 |
|
$fqdn |
| 34 |
|
$pidfile |
| 35 |
|
$retry_wait |
| 36 |
+ |
$ostype |
| 37 |
|
@data |
| 38 |
|
); |
| 39 |
|
|
| 47 |
|
$seq_no = 1; |
| 48 |
|
$retry_wait = 60; |
| 49 |
|
|
| 50 |
+ |
# work out our platform, if we can. |
| 51 |
+ |
$ostype = `uname -s`; |
| 52 |
+ |
chomp $ostype; |
| 53 |
+ |
$ostype = "unknown" if not defined $ostype; |
| 54 |
+ |
|
| 55 |
|
# write our PID to a file |
| 56 |
|
# use home dir by default |
| 57 |
|
#$pidfile = $ENV{"HOME"}; |
| 272 |
|
opendir PLUGINS, $plugins_dir; |
| 273 |
|
my(@plugins) = readdir PLUGINS; |
| 274 |
|
foreach my $plugin (@plugins) { |
| 275 |
< |
push @data, `$plugins_dir/$plugin` if -x "$plugins_dir/$plugin" && -f "$plugins_dir/$plugin"; |
| 275 |
> |
push @data, `$plugins_dir/$plugin $ostype` if -x "$plugins_dir/$plugin" && -f "$plugins_dir/$plugin"; |
| 276 |
|
} |
| 277 |
|
|
| 278 |
|
# get some extra data |
| 429 |
|
$xmltemp .= &make_xml("$curlevel$curtag", $curline); |
| 430 |
|
} |
| 431 |
|
my($nextline) = $data[0]; chomp $nextline if defined $nextline; |
| 432 |
< |
if((defined $nextline) && ($nextline =~ /^$curlevel$curtag/)) { |
| 432 |
> |
$curtag =~ s/(.*)\./$1/; |
| 433 |
> |
if((defined $nextline) && ($nextline =~ /^$curlevel$curtag\./)) { |
| 434 |
|
$curline = ""; |
| 435 |
|
} |
| 436 |
|
else { |
| 430 |
– |
$curtag =~ s/(.*)\./$1/; |
| 437 |
|
$xmltemp = "<$curtag$attributes>$xmltemp</$curtag>" unless $curtag eq ""; |
| 438 |
|
return $xmltemp; |
| 439 |
|
} |