Commit 9a27f509 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Some tiny changes to fix a couple of problems when trying to boot a

raw geni node.
parent 9306d6ba
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2004, 2005, 2006, 2007 University of Utah and the Flux Group.
# Copyright (c) 2004-2008 University of Utah and the Flux Group.
# All rights reserved.
#
use English;
......@@ -142,6 +142,13 @@ sub dotopomap()
my $templt = "/tmp/ltmap.gz";
my $templtp = "/tmp/ltpmap.gz";
#
# Make sure we always try to fetch it fresh
#
unlink("$tempmap");
unlink("$templt");
unlink("$templtp");
#
# Try a couple of times to get the file cause of NFS sillyness.
# Should probably have our own version of cp that retries at the block
......@@ -166,20 +173,12 @@ sub dotopomap()
}
}
}
#
# Make sure we always try to fetch it fresh
#
else {
unlink("$tempmap");
unlink("$templt");
unlink("$templtp");
}
if (! -e $tempmap) {
#
# Try using tmcc. It returns compressed data so do it directly.
#
system(TMCC() . " topomap > $tempmap");
system(TMCCBIN() . " topomap > $tempmap");
#
# tmcc does not really return useful error codes.
#
......@@ -192,7 +191,7 @@ sub dotopomap()
#
# Try using tmcc. It returns compressed data so do it directly.
#
system(TMCC() . " ltmap > $templt");
system(TMCCBIN() . " ltmap > $templt");
#
# tmcc does not really return useful error codes.
#
......@@ -205,7 +204,7 @@ sub dotopomap()
#
# Try using tmcc. It returns compressed data so do it directly.
#
system(TMCC() . " ltpmap > $templtp");
system(TMCCBIN() . " ltpmap > $templtp");
#
# tmcc does not really return useful error codes.
#
......
......@@ -8,6 +8,7 @@ use English;
use Getopt::Std;
use POSIX qw(setsid);
use Data::Dumper;
use strict;
sub usage()
{
......@@ -70,6 +71,7 @@ my $VTUNDCONFIG = CONFDIR() . "/vtund.conf";
my $LOGFILE = $LOGDIR . "/vtund.debug";
# Parse command line.
my %options;
if (! getopts($optlist, \%options)) {
usage();
}
......@@ -284,6 +286,7 @@ sub DoVtun($)
my $inetip = $tunnel->{"tunnel_ip"};
my $mask = $tunnel->{"tunnel_ipmask"};
my $proto = $tunnel->{"tunnel_proto"};
my $didserver= 0;
my $log;
my $cmd = "$VTUND -n -P $dstport -f $VTUNDCONFIG ";
......
......@@ -29,7 +29,7 @@ use Exporter;
SIMTRAFGEN SIMHOST ISDELAYNODEPATH JAILHOST DELAYHOST STARGATE
ISFW FAKEJAILED LINUXJAILED
CONFDIR LOGDIR TMDELAY TMJAILNAME TMSIMRC TMCC
CONFDIR LOGDIR TMDELAY TMJAILNAME TMSIMRC TMCC TMCCBIN
TMNICKNAME TMSTARTUPCMD FINDIF
TMROUTECONFIG TMLINKDELAY TMDELMAP TMTOPOMAP TMLTMAP TMLTPMAP
TMGATEDCONFIG TMSYNCSERVER TMKEYHASH TMNODEID TMEVENTKEY
......@@ -181,6 +181,7 @@ use liblocsetup;
# setup library.
#
sub TMCC() { "$BINDIR/tmcc"; }
sub TMCCBIN() { "$BINDIR/tmcc.bin"; }
sub FINDIF() { "$BINDIR/findif"; }
sub TMUSESFS() { "$BOOTDIR/usesfs"; }
sub ISSIMTRAFGENPATH() { "$BOOTDIR/simtrafgen"; }
......@@ -1192,6 +1193,7 @@ sub gettraceconfig($)
sub gettunnelconfig($)
{
my ($rptr) = @_;
my @tmccresults = ();
my $tunnels = {};
if (tmcc(TMCCCMD_TUNNEL, undef, \@tmccresults) < 0) {
......
......@@ -33,6 +33,7 @@ use Exporter;
TMCCCMD_TIPTUNNELS TMCCCMD_TRACEINFO TMCCCMD_ELVINDPORT
TMCCCMD_PLABEVENTKEYS TMCCCMD_PORTREGISTER
TMCCCMD_MOTELOG TMCCCMD_BOOTWHAT TMCCCMD_ROOTPSWD
TMCCCMD_LTMAP TMCCCMD_LTPMAP TMCCCMD_TOPOMAP
);
# Must come after package declaration!
......@@ -178,6 +179,9 @@ my %commandset =
"portregister" => {TAG => "portregister"},
"bootwhat" => {TAG => "bootwhat"},
"rootpswd" => {TAG => "rootpswd"},
"topomap" => {TAG => "topomap"},
"ltmap" => {TAG => "ltmap"},
"ltpmap" => {TAG => "ltpmap"},
);
#
......@@ -238,6 +242,9 @@ sub TMCCCMD_MOTELOG() { $commandset{"motelog"}->{TAG}; }
sub TMCCCMD_PORTREGISTER(){ $commandset{"portregister"}->{TAG}; }
sub TMCCCMD_BOOTWHAT() { $commandset{"bootwhat"}->{TAG}; }
sub TMCCCMD_ROOTPSWD() { $commandset{"rootpswd"}->{TAG}; }
sub TMCCCMD_TOPOMAP(){ $commandset{"topomap"}->{TAG}; }
sub TMCCCMD_LTMAP() { $commandset{"ltmap"}->{TAG}; }
sub TMCCCMD_LTPMAP() { $commandset{"ltpmap"}->{TAG}; }
#
# Caller uses this routine to set configuration of this library
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment