Changeset 5881 in genesis for tools/FreeBSD5_x


Ignore:
Timestamp:
Jan 28, 2008, 8:52:13 PM (17 years ago)
Author:
rick
Message:

Genesis config cleanups

Location:
tools/FreeBSD5_x
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • tools/FreeBSD5_x/g_list.pl

    r5230 r5881  
    2222};
    2323
    24 sub filelist {
    25   foreach $file ( sort @filelist) {
    26     if( $HTML) {
    27       print "$file<BR>\n";
    28     }
    29     else {
    30       print "$file\n";
    31     };
    32   };
    33 }
    34 
    35 sub listnodes {
    36   opendir(DIR, $ndir) || die "can't opendir $ndir: $!";
    37   @tmpdirs = grep { /^[^\.]/ && -d "$ndir/$_" } readdir(DIR);
    38   closedir DIR;
    39   foreach $dir (sort @tmpdirs) {
    40     if( not exists($removefromnodelist{$dir}) )
    41     {
    42       push(@nodelist, $dir);
    43     }
    44     else
    45     {
    46     if ( $debug ) { print "'$dir' removed from list\n"; }
    47     }
    48   };
    49   return @nodelist;
    50 }
    51 
    52 sub nodelist {
    53   foreach $node (listnodes( )) {
    54     if( $HTML) {
    55       print "$node<BR>\n";
    56     }
    57     else {
    58       print "$node\n";
    59     };
    60   };
    61 }
    6224
    6325#REQUEST parsen
     
    6628  ($node,$file)=split(/\//,$1);
    6729  $title="$node $file";
    68   if ( $debug ) { print "Node: $node\n"; }
    69   if ( $debug ) { print "File: $file\n"; }
    7030}
    7131else {
     
    10464  }
    10565  else {
    106    g_list( );
    107   }
    108 }
    109 elsif( $node eq 'filelist' ) {
    110   filelist( );
    111 }
    112 elsif( $node eq 'nodelist' ) {
    113   nodelist( );
     66    g_list( );
     67  };
    11468}
    11569else {
    11670  if( $file eq '') {
    117       filelist( );
     71    foreach $file ( sort @filelist) {
     72      if( $HTML) {
     73        print "$file<BR>\n";
     74      }
     75      else {
     76        print "$file\n";
     77      };
     78    };
    11879  }
    11980  elsif( $file eq 'config') {
     
    145106      $revision=$1;
    146107    };
    147     printline("<H1>Genesis config (revision: $revision):</H1><P>\n<PRE>");
     108    printline("<H1>Genesis config - last changed rev $revision</H1><P>\n<PRE>");
    148109    printline("$svn_version");
    149110    printline("</PRE>");
     
    154115  };
    155116
    156   @dirs = listnodes( );
     117  opendir(DIR, $ndir) || die "can't opendir $ndir: $!";
     118  @dirs = grep { /^[^\.]/ && -d "$ndir/$_" } readdir(DIR);
     119  closedir DIR;
    157120  foreach $dir (sort @dirs) {
    158121    if( $dir=~/attic/ ) {
  • tools/FreeBSD5_x/genesis.conf

    r5230 r5881  
    2222$filelist[7]="authorized_keys";
    2323
    24 #Ignore this node diretories
    25 %removefromnodelist = (
    26                       'retired' => 'YES',
    27                       'obsolete' => 'YES',
    28                        );
    29 
    30 
    3124#(inter)net env
    3225if( defined $ENV{'SERVER_NAME'} ) {
     
    3831
    3932chomp($hostname);
    40 $cgi_dir="http://$hostname/cgi-bin";
     33$cgi_dir="http://$hostname/freebsd/5.0";
    4134$source="$cgi_dir/g_list.pl";
    4235
    4336#path variablen
    44 $home="/home/genesis";
     37$home="/usr/local/www/wlconfig.wirelessleiden.nl";
    4538$ndir="$home/nodes";
    46 #$toolfile="$home/tools/wleiden.pl";
    47 #Temp Svn fix
    48 $toolfile="$home/tools/FreeBSD5_x/wleiden.pl";
     39$toolfile="$home/freebsd/5.0/wleiden.pl";
    4940
    5041
     
    5748
    5849#module IP.pm
    59 $IP_pmPath='/home/genesis/tools/IP.pm';
     50$IP_pmPath="$home/tools/IP.pm";
    6051
    6152#dnsheader.conf
    62 $dnsheader_confPath='/home/genesis/dns/dnsheader.conf';
     53$dnsheader_confPath="$home/dns/dnsheader.conf";
    6354
    6455
    6556## ssh key variablen ##
    6657#global ssh_keys
    67 $global_keyPath='/home/genesis/nodes/global_keys';
     58$global_keyPath="$home/nodes/global_keys";
    6859#node specific
    6960$ssh_file='ssh_key'
  • tools/FreeBSD5_x/wleiden.pl

    r4981 r5881  
    66
    77# Config located at other file
    8 my $conf_file="/home/genesis/tools/FreeBSD5_x/genesis.conf";
     8my $conf_file="./genesis.conf";
    99do($conf_file) || die("Cann't open $conf_file");
    1010################ END OF CONFIG ##########################
Note: See TracChangeset for help on using the changeset viewer.