Changeset 06a2b49


Ignore:
Timestamp:
Jan 21, 2013 11:05:56 PM (7 years ago)
Author:
Ted Faber <faber@…>
Branches:
master
Children:
328e93f
Parents:
5dbcc93 (diff), dcac546 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of git://fedd.deterlab.net/fedd

Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/deter_impl.py

    rdcac546 r06a2b49  
    88import deter_internal_access
    99import benito_access
     10import desktop_access
    1011import skeleton_access
    1112
     
    8990                elif self.access_type == "benito":
    9091                    self.access = benito_access.access(config, self.auth)
     92                elif self.access_type == "desktop":
     93                    self.access = desktop_access.access(config, self.auth)
    9194                elif self.access_type == "skel":
    9295                    self.access = skeleton_access.access(config, self.auth)
  • fedkit/federate.pl

    r5dbcc93 r06a2b49  
    236236        system("/etc/rc.d/init.d/ntpd stop; /usr/sbin/ntpdate boss; ".
    237237            "/etc/rc.d/init.d/ntpd start");
    238     elsif (-d "/etc/init.d" ) {
     238    } elsif (-d "/etc/init.d" ) {
    239239        system("service ntp stop; /usr/sbin/ntpdate boss; ".
    240240            "service ntp start");
  • fedkit/gateway_lib.pm

    r5dbcc93 r06a2b49  
    3333my $IPROUTE = "/sbin/ip route ";
    3434
     35$BRCTL = '/sbin/brctl' unless -x $BRCTL ;
     36
    3537# Takes an ssh config file and a reference to a hash of keys whose values must
    3638# be set a specific way.  Replaces existing entries with the set values.
     
    4446    $t = new File::Temp() || die "Can't open tempfile: $!\n";
    4547
     48    # If the parameter is in the file (even in a comment) update the line to
     49    # have the new parameter.
     50    my %updated;
    4651    while (<$f>) {
    4752        foreach my $k (keys %{$keys}) {
    48             s/^\s*#?\s*$k.*/$k $keys->{$k}/;
     53            if (s/^\s*#?\s*$k.*/$k $keys->{$k}/) { $updated{$k}++; }
    4954        }
    5055        print $t $_;
     56    }
     57    # Any parameters not found above are output directly.
     58    foreach my $k (keys %{$keys}) {
     59        print $t "$k " . $keys->{$k} . "\n" unless $updated{$k};
    5160    }
    5261    $f->close();
     
    278287    $ipipe->reader("$IFCONFIG");
    279288    while(<$ipipe>) {
    280         /^([[:alnum:]]+):/ && do {
     289        /^([[:alnum:]]+):?/ && do {
    281290            $iface = $1;
    282291            next;
    283292        };
    284         /inet\s+([0-9\.]+)/ && do {
    285             if ($1 eq $addr) {
     293        /inet(\s+addr:)?\s*([0-9\.]+)/ && do {
     294            if ($2 eq $addr) {
    286295                $ipipe->close();
    287296                return $iface;
  • fedkit/prep_gateway.pl

    r5dbcc93 r06a2b49  
    4040    gateway_lib::set_sshd_params(
    4141        { 'GatewayPorts' => 'yes', 'PermitTunnel' => 'yes' } );
    42     system("/etc/init.d/sshd restart");
     42    if ( -x "/etc/init.d/sshd") {
     43        system("/etc/init.d/sshd restart");
     44    }
     45    elsif (-x "/etc/init.d/ssh") {
     46        # XXX should look for service
     47        system("/etc/init.d/ssh restart");
     48    }
     49    else {
     50        print "Cannot figure out how to restart sshd\n";
     51    }
    4352    gateway_lib::import_key($ssh_pubkey,'/root/.ssh/authorized_keys')
    4453        if $ssh_pubkey;
     54    # Make sure the tap interface is available
     55    system('modprobe tun');
    4556    # Install bridging software if not present
    4657    if ( -x '/usr/bin/yum' ) {
Note: See TracChangeset for help on using the changeset viewer.