Changeset 8802 in genesis for config/iris/node/FreeBSD/8.0-RELEASE


Ignore:
Timestamp:
Feb 11, 2011, 6:53:59 PM (14 years ago)
Author:
richardvm
Message:

New file which prints all proxies in a variable (needed for lvrouted)

Location:
config/iris/node/FreeBSD/8.0-RELEASE
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • config/iris/node/FreeBSD/8.0-RELEASE/genesis.conf

    r8677 r8802  
    2121$filelist[5]="authorized_keys";
    2222$filelist[6]="dnsmasq.conf";
     23$filelist[7]="wleiden.conf";
     24
    2325
    2426#Ignore this node diretories
     
    4446#path variablen
    4547$home=getcwd;
    46 $ndir="$home/../../../../../nodes";
     48$ndir="/usr/local/www/wlconfig/nodes/";
    4749$toolfile="$home/wleiden.pl";
    4850
  • config/iris/node/FreeBSD/8.0-RELEASE/wleiden.pl

    r8676 r8802  
    209209};
    210210
    211 
     211sub wleiden_conf {
     212  # Generate our header
     213  my $output = genHeader("#");
     214
     215  # Get al proxies
     216  opendir(BIN, $ndir) or die "Can't open $dir: $!";
     217  @proxyfiles = grep(/proxy/, readdir(BIN));
     218  closedir(BIN);
     219
     220  # Walk through all our config files and get master_ip (and are up)
     221  @proxies = ();
     222  foreach $file (@proxyfiles) {
     223    $nfile = "$ndir/$file/wleiden.conf";
     224    parse_config($nfile);
     225    if ($status == "up") {
     226      $proxies[$proxyid] = $master_ip;
     227    }
     228  }
     229
     230  # Print the Ip's in shell variable script format
     231  $output .= "PROXIES=`cat <<EOF\n";
     232  foreach $ip (@proxies) {
     233    if ($ip) {
     234      $output .= "$ip\n";
     235    }
     236  }
     237  $output .= "`\n";
     238}
    212239
    213240sub rc_conf_local {
Note: See TracChangeset for help on using the changeset viewer.