Changeset 4174 in genesis


Ignore:
Timestamp:
Mar 27, 2005, 2:11:21 PM (20 years ago)
Author:
rick
Message:

-Add support for ssh-keys
-Global config file

Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • tools/g_list.pl

    r4128 r4174  
    11#!/usr/bin/perl -w
    22#
     3# Copyright 2005 Stichting Wireless Leiden
     4# Rick van der Zwet
    35#
    4 #
    5 
    6 
    7 #filelist
    8 my @filelist = ();
    9 $filelist[0]="dhcpd.conf";
    10 $filelist[1]="rc.local";
    11 $filelist[2]="rc.node.local";
    12 $filelist[3]="resolv.conf";
    13 $filelist[4]="named.conf";
    14 $filelist[5]="snmpd.local.conf";
    15 $filelist[6]="txtconfig";
    16 
    17 #(inter)net env
    18 my $hostname=`hostname`;
    19 chomp($hostname);
    20 my $cgi_dir="http://$hostname/cgi-bin";
    21 my $source="$cgi_dir/g_list.pl";
    22 
    23 #path variablen
    24 my $home="/home/genesis";
    25 my $ndir="$home/nodes";
    26 my $toolfile="$home/tools/wleiden.pl";
    27 
    28 #exec vars
    29 my $svn="/usr/local/bin/svn";
    30 
    31 #naming vars
    32 my $configfile="wleiden.conf";
    33 
    34 ######################## END OF CONFIG ##########################
     6
     7# Config located at other file
     8my $conf_file="/home/genesis/tools/genesis.conf";
     9do($conf_file) || die("Cann't open $conf_file");
     10
     11
     12
    3513my $HTML=1;
    3614
  • tools/wleiden.pl

    r4115 r4174  
    11#!/usr/bin/perl -w
    22#
     3# Copyright 2005 Stichting Wireless Leiden
     4# maart 2004 rick@wirelessleiden.nl
    35#
    4 #  maart 2004 rick@wirelessleiden.nl
    5 #
    6 
    7 my $debug=0;
    8 my $author="feb 2003 jasper\@WirelessLeiden.NL \| maart 2005 rick\@WirelessLeiden.NL";
    9 my $wicontrol='/usr/sbin/wicontrol';
    10 my $IP_pmPath='/home/genesis/tools/IP.pm';
    11 my $dnsheader_confPath='/home/genesis/dns/dnsheader.conf';
    12 
     6
     7# Config located at other file
     8my $conf_file="/home/genesis/tools/genesis.conf";
     9do($conf_file) || die("Cann't open $conf_file");
     10################ END OF CONFIG ##########################
    1311
    1412#variablen
     
    316314};
    317315
     316sub authorized_keys {
     317  my $output = genHeader("#");
     318  if( -e "$global_keyPath" ) {
     319    open( GLOBAL, "$global_keyPath" ) || die ("Cann't open $global_keyPath");
     320      $output .= join("", <GLOBAL>);
     321    close( GLOBAL );
     322  }
     323  else {
     324    $output .= "# No $global_keyPath\n";
     325  };
     326 
     327  if( -e "$ndir/$nodetype$nodename/$ssh_file" ) {
     328    open( NODE, "$ndir/$nodetype$nodename/$ssh_file" ) || die ("Cann't open $home/$nodename/$ssh_file");
     329      $output .= join("", <NODE>);
     330    close( NODE );
     331  }
     332  else {
     333    $output .= "# No $ndir/$nodetype$nodename/$ssh_file\n";
     334  };
     335 
     336  return($output);
     337};
     338
    318339sub do_it {
    319340  my $file = $_[0];
Note: See TracChangeset for help on using the changeset viewer.