| Line 1... |
Line 1... |
| 1 |
#!/usr/bin/env perl
|
1 |
#! /usr/bin/env perl
|
| - |
|
2 |
|
| 2 |
use warnings;
|
3 |
use warnings;
|
| 3 |
use strict;
|
4 |
use strict;
|
| 4 |
|
5 |
|
| 5 |
# sysinfo
|
6 |
# sysinfo
|
| 6 |
# Author: R. W. Rodolico
|
7 |
# Author: R. W. Rodolico
|
| Line 177... |
Line 178... |
| 177 |
# $TESTING has been set to a binary. If true, the report is not sent via the transports, but is dumped to /tmp/sysinfo.testing.yaml
|
178 |
# $TESTING has been set to a binary. If true, the report is not sent via the transports, but is dumped to /tmp/sysinfo.testing.yaml
|
| 178 |
#
|
179 |
#
|
| 179 |
# Version 3.4.1 20191117 RWR
|
180 |
# Version 3.4.1 20191117 RWR
|
| 180 |
# Added syslog as a possible option for logging.
|
181 |
# Added syslog as a possible option for logging.
|
| 181 |
#
|
182 |
#
|
| - |
|
183 |
# Version 3.5.1 20200317 RWR
|
| - |
|
184 |
# changed so report->version will show the version of sysinfo, not the data version
|
| 182 |
|
185 |
|
| 183 |
# find our location and use it for searching for libraries
|
186 |
# find our location and use it for searching for libraries
|
| 184 |
BEGIN {
|
187 |
BEGIN {
|
| 185 |
use FindBin;
|
188 |
use FindBin;
|
| 186 |
use File::Spec;
|
189 |
use File::Spec;
|
| Line 193... |
Line 196... |
| 193 |
my $sourceDir = File::Spec->catdir($FindBin::Bin);
|
196 |
my $sourceDir = File::Spec->catdir($FindBin::Bin);
|
| 194 |
|
197 |
|
| 195 |
# define the version number
|
198 |
# define the version number
|
| 196 |
# see https://metacpan.org/pod/release/JPEACOCK/version-0.97/lib/version.pod
|
199 |
# see https://metacpan.org/pod/release/JPEACOCK/version-0.97/lib/version.pod
|
| 197 |
use version;
|
200 |
use version;
|
| 198 |
our $VERSION = version->declare("v3.5.0");
|
201 |
our $VERSION = version->declare("v3.5.1");
|
| 199 |
our $DATA_VERSION = version->declare( 'v3.0.0' ); # used in sending the data file. sets version of XML/YAML data file
|
202 |
our $DATA_VERSION = version->declare( 'v3.0.0' ); # used in sending the data file. sets version of XML/YAML data file
|
| 200 |
|
203 |
|
| 201 |
# see https://perldoc.perl.org/Getopt/Long.html
|
204 |
# see https://perldoc.perl.org/Getopt/Long.html
|
| 202 |
use Getopt::Long;
|
205 |
use Getopt::Long;
|
| 203 |
# allow -vvn (ie, --verbose --verbose --dryrun)
|
206 |
# allow -vvn (ie, --verbose --verbose --dryrun)
|
| Line 723... |
Line 726... |
| 723 |
&logIt( 0, "Testing => $TESTING" ) if $TESTING;
|
726 |
&logIt( 0, "Testing => $TESTING" ) if $TESTING;
|
| 724 |
|
727 |
|
| 725 |
|
728 |
|
| 726 |
my $System; # hash reference that will store all info we are going to send to the server
|
729 |
my $System; # hash reference that will store all info we are going to send to the server
|
| 727 |
# some defaults.
|
730 |
# some defaults.
|
| 728 |
$System->{'report'}->{'version'} = $DATA_VERSION->normal;
|
731 |
$System->{'report'}->{'version'} = $VERSION->normal;
|
| 729 |
$System->{'report'}->{'date'} = $reportDate;
|
732 |
$System->{'report'}->{'date'} = $reportDate;
|
| 730 |
$System->{'report'}->{'client'} = $configuration{'clientName'};
|
733 |
$System->{'report'}->{'client'} = $configuration{'clientName'};
|
| 731 |
$System->{'system'}->{'hostname'} = $configuration{'hostname'};
|
734 |
$System->{'system'}->{'hostname'} = $configuration{'hostname'};
|
| 732 |
$System->{'system'}->{'serial'} = $configuration{'serialNumber'};
|
735 |
$System->{'system'}->{'serial'} = $configuration{'serialNumber'};
|
| 733 |
$System->{'system'}->{'UUID'} = $configuration{'UUID'};
|
736 |
$System->{'system'}->{'UUID'} = $configuration{'UUID'};
|