Changeset 5881 in genesis
- Timestamp:
- Jan 28, 2008, 8:52:13 PM (17 years ago)
- Location:
- tools
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/FreeBSD5_x/g_list.pl
r5230 r5881 22 22 }; 23 23 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 else45 {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 }62 24 63 25 #REQUEST parsen … … 66 28 ($node,$file)=split(/\//,$1); 67 29 $title="$node $file"; 68 if ( $debug ) { print "Node: $node\n"; }69 if ( $debug ) { print "File: $file\n"; }70 30 } 71 31 else { … … 104 64 } 105 65 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 }; 114 68 } 115 69 else { 116 70 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 }; 118 79 } 119 80 elsif( $file eq 'config') { … … 145 106 $revision=$1; 146 107 }; 147 printline("<H1>Genesis config (revision: $revision):</H1><P>\n<PRE>");108 printline("<H1>Genesis config - last changed rev $revision</H1><P>\n<PRE>"); 148 109 printline("$svn_version"); 149 110 printline("</PRE>"); … … 154 115 }; 155 116 156 @dirs = listnodes( ); 117 opendir(DIR, $ndir) || die "can't opendir $ndir: $!"; 118 @dirs = grep { /^[^\.]/ && -d "$ndir/$_" } readdir(DIR); 119 closedir DIR; 157 120 foreach $dir (sort @dirs) { 158 121 if( $dir=~/attic/ ) { -
tools/FreeBSD5_x/genesis.conf
r5230 r5881 22 22 $filelist[7]="authorized_keys"; 23 23 24 #Ignore this node diretories25 %removefromnodelist = (26 'retired' => 'YES',27 'obsolete' => 'YES',28 );29 30 31 24 #(inter)net env 32 25 if( defined $ENV{'SERVER_NAME'} ) { … … 38 31 39 32 chomp($hostname); 40 $cgi_dir="http://$hostname/ cgi-bin";33 $cgi_dir="http://$hostname/freebsd/5.0"; 41 34 $source="$cgi_dir/g_list.pl"; 42 35 43 36 #path variablen 44 $home="/ home/genesis";37 $home="/usr/local/www/wlconfig.wirelessleiden.nl"; 45 38 $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"; 49 40 50 41 … … 57 48 58 49 #module IP.pm 59 $IP_pmPath= '/home/genesis/tools/IP.pm';50 $IP_pmPath="$home/tools/IP.pm"; 60 51 61 52 #dnsheader.conf 62 $dnsheader_confPath= '/home/genesis/dns/dnsheader.conf';53 $dnsheader_confPath="$home/dns/dnsheader.conf"; 63 54 64 55 65 56 ## ssh key variablen ## 66 57 #global ssh_keys 67 $global_keyPath= '/home/genesis/nodes/global_keys';58 $global_keyPath="$home/nodes/global_keys"; 68 59 #node specific 69 60 $ssh_file='ssh_key' -
tools/FreeBSD5_x/wleiden.pl
r4981 r5881 6 6 7 7 # Config located at other file 8 my $conf_file=" /home/genesis/tools/FreeBSD5_x/genesis.conf";8 my $conf_file="./genesis.conf"; 9 9 do($conf_file) || die("Cann't open $conf_file"); 10 10 ################ END OF CONFIG ########################## -
tools/FreeBSD6_x/g_list.pl
r5722 r5881 6 6 7 7 # Config located at other file 8 my $local_conf_file="./genesis.conf.local"; 9 do($local_conf_file) || die("Cann't open $local_conf_file"); 10 8 my $conf_file="./genesis.conf"; 11 9 do($conf_file) || die("Cann't open $conf_file"); 10 12 11 13 12 … … 146 145 $revision=$1; 147 146 }; 148 printline("<H1>Genesis config (revision: $revision):</H1><P>\n<PRE>");147 printline("<H1>Genesis config - last changed rev $revision</H1><P>\n<PRE>"); 149 148 printline("$svn_version"); 150 149 printline("</PRE>"); -
tools/FreeBSD6_x/genesis.conf
r5722 r5881 1 #!/usr/bin/perl - 1 #!/usr/bin/perl -w 2 2 # 3 3 # Variable file … … 26 26 ); 27 27 28 #(inter)net env 29 if( defined $ENV{'SERVER_NAME'} ) { 30 $hostname=$ENV{'SERVER_NAME'}; 31 } 32 else { 33 $hostname=`hostname`; 34 }; 28 35 36 chomp($hostname); 37 $cgi_dir="http://$hostname/freebsd/6.0"; 38 $source="$cgi_dir/g_list.pl"; 39 40 #path variablen 41 $home="/usr/local/www/wlconfig.wirelessleiden.nl"; 42 $ndir="$home/nodes"; 43 $toolfile="$home/freebsd/6.0/wleiden.pl"; 44 45 46 #exec vars 47 $svn="/usr/local/bin/svn"; 48 $wicontrol='/usr/sbin/wicontrol'; 29 49 30 50 #naming vars … … 37 57 $dnsheader_confPath="$home/dns/dnsheader.conf"; 38 58 39 #node dir40 $ndir="$home/nodes";41 42 #wleiden.pl Path43 $toolfile="$home/tools/FreeBSD6_x/wleiden.pl";44 59 45 60 ## ssh key variablen ## -
tools/FreeBSD6_x/wleiden.pl
r5722 r5881 6 6 7 7 # Config located at other file 8 # Config located at other file 9 my $local_conf_file="./genesis.conf.local"; 10 do($local_conf_file) || die("Cann't open $local_conf_file"); 11 8 my $conf_file="./genesis.conf"; 12 9 do($conf_file) || die("Cann't open $conf_file"); 13 10 ################ END OF CONFIG ##########################
Note:
See TracChangeset
for help on using the changeset viewer.