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

At Rob's request, replace @OURDOMAIN@ config variable with code to

grab that from the bossname using tmcc (be nice if bsd/linux had a
consistent way to get the domainname).
parent 35155820
......@@ -10,11 +10,6 @@ use English;
use Errno;
use POSIX qw(setsid);
#
# Configure Variables
#
my $OURDOMAIN = "@OURDOMAIN@";
# Drag in path stuff so we can find emulab stuff.
BEGIN { require "/etc/emulab/paths.pm"; import emulabpaths; }
......@@ -140,6 +135,21 @@ if ($dojail && $doplab) {
my $pidfile = "/var/run/tbvnode-${vnodeid}.pid";
my $logname = "$LOGDIR/tbvnode-${vnodeid}.log";
#
# Need the domain, but no conistent way to do it. Ask tmcc for the
# boss node and parse out the domain.
#
my ($DOMAINNAME) = split(" ", `tmcc bossinfo`);
die("Could not get bossinfo!")
if ($?);
if ($DOMAINNAME =~ /^[-\w]+\.(.*)$/) {
$DOMAINNAME = $1;
}
else {
die("Could not parse domain name!");
}
#
# If killing/halting the virtual node, then kill the manager process.
#
......@@ -373,7 +383,7 @@ if ($dojail) {
}
else {
my $option = ($interactive ? "-s" : "");
my $jailhostname = "$vname.$eid.$pid.$OURDOMAIN";
my $jailhostname = "$vname.$eid.$pid.$DOMAINNAME";
exec("mkjail.pl $option -p $pid -h $jailhostname $vnodeid");
die("*** $0:\n".
......
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