Changeset 5000 in genesis for tools


Ignore:
Timestamp:
Nov 5, 2005, 11:17:04 PM (19 years ago)
Author:
rick
Message:

Added display of version of FreeBSD expected

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/g_list.pl

    r4990 r5000  
    66
    77# Config located at other file
    8 my $conf_file="/home/genesis/tools/genesis.conf";
    9 do($conf_file) || die("Cann't open $conf_file");
     8# my $conf_file="/home/genesis/tools/genesis.conf";
     9# do($conf_file) || die("Cann't open $conf_file");
     10die "Run with the preamble in cgi-bin"
     11       unless defined $conf_file;
    1012
    1113my $HTML=1;
     
    3739if( $browser=~/curl|wget|fetch/i) {
    3840  $HTML=0;
    39   printline("Content-type: text/html\n\n");
     41  print "Content-type: text/plain\n\n";
    4042}
    4143else {
     
    7678    };
    7779  }
     80  elsif( $file eq 'info') {
     81    g_info($hostname);
     82  }
    7883  elsif( $file eq 'config') {
    7984    g_print($hostname);
     
    99104#Het opbouwen van het begin scherm
    100105sub g_list {
     106  my $version = 1;
     107  $version = $1 if $ENV{"QUERY_STRING"}=~/version=(\d+)/i;
     108
    101109  if( $HTML) {
    102110    my $svn_version=svn_version("$ndir");
     
    136144};
    137145
    138 
    139 
    140146#ophalen svn versie
    141147sub svn_version {
     
    149155};
    150156
    151 
     157# Print info on this node; version of the OS
     158# expected, etc..
     159sub g_info {
     160  my $config="$ndir/$node/$configfile";
     161  parse_config($config);
     162
     163  $release = 'unknown' unless $release;
     164  $node_config_version = 0 unless $node_config_version;
     165  $genesis_control = 'NO' unless $genesis_control;
     166  $OS = 'Unknown' unless $OS;
     167  print <<"EOM";
     168$OS $release $node_config_version $genesis_control
     169#
     170# Operating system release:     $OS on $release
     171# Node Config script version:   $node_config_version
     172# Under Gensis control:         $genesis_control
     173#
     174EOM
     175}
    152176
    153177#netjes de configuratie printen
     
    185209 printline("Y=$Y");
    186210 printline("");
    187  printline("OS=$OS");
     211 printline("Operating system: $OS / $release");
     212 printline("Config management: Version $node_config_version, Used: $genesis_control");
    188213 printline("");
    189214 printline("$TP");
Note: See TracChangeset for help on using the changeset viewer.