Changeset 06a2b49
- Timestamp:
- Jan 21, 2013 11:05:56 PM (12 years ago)
- 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. - Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/deter_impl.py
rdcac546 r06a2b49 8 8 import deter_internal_access 9 9 import benito_access 10 import desktop_access 10 11 import skeleton_access 11 12 … … 89 90 elif self.access_type == "benito": 90 91 self.access = benito_access.access(config, self.auth) 92 elif self.access_type == "desktop": 93 self.access = desktop_access.access(config, self.auth) 91 94 elif self.access_type == "skel": 92 95 self.access = skeleton_access.access(config, self.auth) -
fedkit/federate.pl
r5dbcc93 r06a2b49 236 236 system("/etc/rc.d/init.d/ntpd stop; /usr/sbin/ntpdate boss; ". 237 237 "/etc/rc.d/init.d/ntpd start"); 238 elsif (-d "/etc/init.d" ) {238 } elsif (-d "/etc/init.d" ) { 239 239 system("service ntp stop; /usr/sbin/ntpdate boss; ". 240 240 "service ntp start"); -
fedkit/gateway_lib.pm
r5dbcc93 r06a2b49 33 33 my $IPROUTE = "/sbin/ip route "; 34 34 35 $BRCTL = '/sbin/brctl' unless -x $BRCTL ; 36 35 37 # Takes an ssh config file and a reference to a hash of keys whose values must 36 38 # be set a specific way. Replaces existing entries with the set values. … … 44 46 $t = new File::Temp() || die "Can't open tempfile: $!\n"; 45 47 48 # If the parameter is in the file (even in a comment) update the line to 49 # have the new parameter. 50 my %updated; 46 51 while (<$f>) { 47 52 foreach my $k (keys %{$keys}) { 48 s/^\s*#?\s*$k.*/$k $keys->{$k}/;53 if (s/^\s*#?\s*$k.*/$k $keys->{$k}/) { $updated{$k}++; } 49 54 } 50 55 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}; 51 60 } 52 61 $f->close(); … … 278 287 $ipipe->reader("$IFCONFIG"); 279 288 while(<$ipipe>) { 280 /^([[:alnum:]]+): / && do {289 /^([[:alnum:]]+):?/ && do { 281 290 $iface = $1; 282 291 next; 283 292 }; 284 /inet \s+([0-9\.]+)/ && do {285 if ($ 1eq $addr) {293 /inet(\s+addr:)?\s*([0-9\.]+)/ && do { 294 if ($2 eq $addr) { 286 295 $ipipe->close(); 287 296 return $iface; -
fedkit/prep_gateway.pl
r5dbcc93 r06a2b49 40 40 gateway_lib::set_sshd_params( 41 41 { '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 } 43 52 gateway_lib::import_key($ssh_pubkey,'/root/.ssh/authorized_keys') 44 53 if $ssh_pubkey; 54 # Make sure the tap interface is available 55 system('modprobe tun'); 45 56 # Install bridging software if not present 46 57 if ( -x '/usr/bin/yum' ) {
Note: See TracChangeset
for help on using the changeset viewer.