- Timestamp:
- Mar 9, 2010 1:08:05 AM (15 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
- Children:
- 4e9719b
- Parents:
- c2c153b
- Location:
- fedkit
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
fedkit/Makefile
rc2c153b r9b3627e 3 3 config_from_tunnelip.pl active_config.pl combo.pl \ 4 4 prep_gateway.pl port_forward.pl setup_bridge.pl import_key.pl \ 5 protogeni_routing.pl 5 protogeni_routing.pl start_seer.pl 6 6 7 7 LIBRARIES=gateway_lib.pm -
fedkit/combo.pl
rc2c153b r9b3627e 18 18 my $iface_file = "/var/emulab/boot/ifmap"; 19 19 my $ssh = "/usr/bin/ssh"; 20 my $seer; 20 21 my $ssh_port = 22; 21 22 my @ports; … … 35 36 'ssh_port=s' => \$ssh_port, 36 37 'use_file' => \$use_file, 38 'seer' => \$seer, 37 39 ); 38 40 … … 61 63 "--ssh=$ssh --ssh_port=$ssh_port $portparam"); 62 64 exit(20) if $?; 65 66 if ($seer ) { 67 system("$perl -I$fedkit_dir/lib $fedkit_dir/bin/start_seer.pl " . 68 "--peer=$peer --seer --fedkit=$fedkit_dir --perl=$perl " . 69 "--ssh=$ssh --ssh_privkey=$ssh_privkey"); 70 exit(20) if $?; 71 } 72 63 73 } 64 74 else { -
fedkit/federate.pl
rc2c153b r9b3627e 58 58 $from->close(); 59 59 $to->close(); 60 # Now, samba 61 system('/usr/bin/yum -y install samba-client'); 60 # Now, samba. Because of the python dance on PG, we need to call python2.2 61 # explicitly 62 system('/usr/bin/python2.2 /usr/bin/yum -y install samba-client'); 62 63 # These tools expect the fstab to include smbfs instead 63 64 $smb_type = 'smbfs'; -
fedkit/gateway_lib.pm
rc2c153b r9b3627e 367 367 368 368 369 sub client_conf_filename { 370 # Find the configuration file in the usual places, if there is one in 371 # /usr/local/federation/etc, use it, otherwise look in the emulab standard 372 # filesystems which depends on what experiment and project we're in. 373 my $pid; 374 my $eid; 375 my $filename; 376 my $fed_dir = "/usr/local/federation/etc/"; 377 378 return "$fed_dir/client.conf" if -r "$fed_dir/client.conf"; 379 380 my $tmcd = new IO::Pipe() || die "Can't create pipe: $!\n"; 381 382 $tmcd->reader("$TMCC status"); 383 384 while (<$tmcd>) { 385 chomp; 386 /ALLOCATED=([^\/]+)\/(\S+)/ && do { 387 $pid = $1; 388 $eid = $2; 389 }; 390 } 391 $tmcd->close(); 392 $filename = "/proj/$pid/exp/$eid/tmp/client.conf" 393 if $pid and $eid; 394 395 return $filename; 396 } 397 369 398 sub wait_for_port { 370 399 my($addr, $port, $timeout, $sleep) = @_; … … 376 405 377 406 while (!$s) { 407 # We've seen some arp pollution, so be proactive about clearing the 408 # cache if we're waiting to get out. 409 system("arp -d -a"); 378 410 if (!($s = new IO::Socket(Domain => &AF_INET, PeerAddr => $addr, 379 411 PeerPort => $port))) { -
fedkit/prep_gateway.pl
rc2c153b r9b3627e 49 49 $from->close(); 50 50 $to->close(); 51 # Now, bridging 52 system('/usr/bin/ yum -y install bridge-utils');51 # Now, bridging (use old python...) 52 system('/usr/bin/python2.2 /usr/bin/yum -y install bridge-utils'); 53 53 #and keys 54 54 gateway_lib::import_key($ssh_pubkey,'/root/.ssh/authorized_keys') -
fedkit/smbmount.Linux.pl
rc2c153b r9b3627e 59 59 /GID=(\S+)/ && do { $gid = $1; }; 60 60 /HOMEDIR=(\S+)/ && do { $homedir = $1; }; 61 my $ids = $FSTYPE == 'smbfs' ? ",uid=$uid,gid=$gid" : ""; 61 62 62 63 open(PWDFILE, ">/tmp/$user.cifs_creds") || … … 70 71 print FSTAB "//$SHARE/$user\t"; 71 72 print FSTAB "$homedir\t$FSTYPE\t"; 72 print FSTAB "auto,rw,credentials=/tmp/$user.cifs_creds ,ip=$ADDR\t0\t0\n";73 print FSTAB "auto,rw,credentials=/tmp/$user.cifs_creds$ids,ip=$ADDR\t0\t0\n"; 73 74 74 75 # … … 83 84 if($user =~ m/$PUSER/i) { 84 85 print FSTAB "//$SHARE/proj-$PNAME\t"; 85 print FSTAB "$PROJROOT/$PNAME\tcifs\t"; 86 print FSTAB "rw,credentials=/tmp/$user.cifs_creds,ip=$ADDR\t0\t0\n"; 86 print FSTAB "$PROJROOT/$PNAME\t$FSTYPE\t"; 87 print FSTAB "rw,credentials=/tmp/$user.cifs_creds$ids,ip=$ADDR\t0\t0\n"; 88 mkdir("/$PROJROOT/$PNAME") unless -d "/$PROJROOT/$PNAME"; 87 89 if ( $share) { 88 90 print FSTAB "//$SHARE/share\t"; 89 91 print FSTAB "/share\t$FSTYPE\t"; 90 print FSTAB "rw,credentials=/tmp/$user.cifs_creds ,ip=$ADDR\t0\t0\n";92 print FSTAB "rw,credentials=/tmp/$user.cifs_creds$ids,ip=$ADDR\t0\t0\n"; 91 93 92 94 mkdir("/share") unless -d "/share";
Note: See TracChangeset
for help on using the changeset viewer.