1#@PERL@ -w
2@PERL_LIB_PATH_CODE@
3
4my %conf = (
5    VERSION           => "@PKG_VERSION@",
6    USE_RRDs          => "@RRDS@",
7    DEBUG_LEVEL       => "@DEBUG@",
8    PERL_LIB_PATH     => "@PERL_LIB_PATH@"
9);
10
11if ( $conf{USE_RRDs} == 1 ) {
12    unless ( eval "use RRDs;1" ) {
13        $conf{USE_RRDs} = 0;
14    }
15}
16
17if($conf{USE_RRDs} == 1){
18    $rrds_version = $RRDs::VERSION;
19}
20
21my $RRD_BINARY = "@RRDTOOL@";
22@T = `$RRD_BINARY`;
23@v = split(/ /,$T[0]);
24$rrdtool_version = $v[1];
25$rrdtool_message = "";
26if($rrdtool_version == ""){
27    $rrdtool_message = "WARNING: \"$RRD_BINARY\" does not look like rrdtool";
28}else{
29    $rrdtool_message = "$RRD_BINARY Version $rrdtool_version";
30}
31
32printf ("\n\n");
33printf ("*** Configuration summary for %s-%s %s ***","@PKG_NAME@","@PKG_VERSION@","@PKG_REL_DATE@");
34printf ("\n\n");
35printf ("  General Options:\n");
36printf ("  -------------------------         -------------------\n");
37printf ("  Nagios user/group:                %s %s\n","@nagios_user@","@nagios_grp@");
38printf ("  Install directory:                %s\n","@prefix@");
39printf ("  HTML Dir:                         %s\n","@datarootdir@");
40printf ("  Config Dir:                       %s\n","@sysconfdir@");
41printf ("  Location of rrdtool binary:       %s\n",$rrdtool_message);
42printf ("  RRDs Perl Modules:                %s\n","*** NOT FOUND ***")            if($conf{USE_RRDs} == 0);
43printf ("  RRDs Perl Modules:                %s (Version %s)\n","FOUND", $rrds_version)    if($conf{USE_RRDs} == 1);
44printf ("  RRDs Perl search path:            %s\n","@PERL_LIB_PATH@")              if($conf{PERL_LIB_PATH} ne "");
45printf ("  RRD Files stored in:              %s\n","@PERFDATA_DIR@");
46printf ("  process_perfdata.pl Logfile:      %s\n","@PERFDATA_LOG@");
47printf ("  Perfdata files (NPCD) stored in:  %s\n","@PERFDATA_SPOOL_DIR@");
48printf ("\n");
49printf ("  Web Interface Options:\n");
50printf ("  -------------------------         -------------------\n");
51printf ("  HTML URL:                         %s\n","http://localhost@BASE_URL@");
52printf ("  Apache Config File:               %s\n","@HTTPD_CONF@/@PKG_NAME@.conf");
53if( $#ARGV == -1){
54printf ("\n\n");
55printf ("  Review the options above for accuracy.  If they look okay,\n");
56printf ("  type 'make all' to compile.\n");
57}
58if($conf{USE_RRDs} == 0){
59    print "\n\n";
60    print "  WARNING: The RRDs Perl Modules are not found on your system\n";
61    print "           Using RRDs will speedup things in larger installations.\n";
62}
63
64if($ENV{DESTDIR}){
65    print "\n\n";
66    print "  WARNING: \$DESTDIR is set to $ENV{DESTDIR} \n";
67}
68
69if($conf{DEBUG_LEVEL} != 0){
70    printf ("\n\n");
71    printf ("  Found PERL at:                    %s\n","@PERL@");
72    printf ("  Found SHELL at:                   %s\n","@SHELL@");
73    printf ("  Debug Level:                      %s\n","@DEBUG@");
74    printf ("  Libexecdir:                       %s\n","@libexecdir@");
75    printf ("  localstatedir:                    %s\n","@localstatedir@");
76    printf ("  libdir:                           %s\n","@libdir@");
77    printf ("  sysconfdir:                       %s\n","@sysconfdir@");
78    printf ("  datarootdir:                      %s\n","@datarootdir@");
79    printf ("  sbindir:                          %s\n","@sbindir@");
80    printf ("  bindir:                           %s\n","@bindir@");
81    printf ("  System:                           %s\n","@host_os@");
82}
83
84print "\n\n";
85
86exit 0;
87