- Timestamp:
- Nov 5, 2005, 11:17:04 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/g_list.pl
r4990 r5000 6 6 7 7 # 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"); 10 die "Run with the preamble in cgi-bin" 11 unless defined $conf_file; 10 12 11 13 my $HTML=1; … … 37 39 if( $browser=~/curl|wget|fetch/i) { 38 40 $HTML=0; 39 print line("Content-type: text/html\n\n");41 print "Content-type: text/plain\n\n"; 40 42 } 41 43 else { … … 76 78 }; 77 79 } 80 elsif( $file eq 'info') { 81 g_info($hostname); 82 } 78 83 elsif( $file eq 'config') { 79 84 g_print($hostname); … … 99 104 #Het opbouwen van het begin scherm 100 105 sub g_list { 106 my $version = 1; 107 $version = $1 if $ENV{"QUERY_STRING"}=~/version=(\d+)/i; 108 101 109 if( $HTML) { 102 110 my $svn_version=svn_version("$ndir"); … … 136 144 }; 137 145 138 139 140 146 #ophalen svn versie 141 147 sub svn_version { … … 149 155 }; 150 156 151 157 # Print info on this node; version of the OS 158 # expected, etc.. 159 sub 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 # 174 EOM 175 } 152 176 153 177 #netjes de configuratie printen … … 185 209 printline("Y=$Y"); 186 210 printline(""); 187 printline("OS=$OS"); 211 printline("Operating system: $OS / $release"); 212 printline("Config management: Version $node_config_version, Used: $genesis_control"); 188 213 printline(""); 189 214 printline("$TP");
Note:
See TracChangeset
for help on using the changeset viewer.