From 8139d82a69a897e847935f78ba5a7e814418eb6a Mon Sep 17 00:00:00 2001 From: "Leigh B. Stoller" Date: Thu, 25 Sep 2008 17:46:32 +0000 Subject: [PATCH] Call tmcd jailconfig to get the name of the event server to use for evproxy. --- tmcd/common/config/rc.fakejail | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/tmcd/common/config/rc.fakejail b/tmcd/common/config/rc.fakejail index 39ab49f02..3ff8962a0 100755 --- a/tmcd/common/config/rc.fakejail +++ b/tmcd/common/config/rc.fakejail @@ -135,12 +135,30 @@ sub doboot() if (!defined($pid)) { return; } + # Get the boss info for below. my ($bossname, $bossip) = tmccbossinfo(); if (!defined($bossname)) { BootFatal("Could not determine the name of the boss server"); } my ($domain) = ($bossname =~ /^[^\.]+\.(.*)$/); + + print("Checking Testbed jail configuration\n"); + my @tmccresults = (); + if (tmcc(TMCCCMD_JAILCONFIG, undef, \@tmccresults) < 0) { + fatal("Could not get jailconfig from server!"); + } + return + if (! @tmccresults); + + my $eventserver = "event-server.${domain}"; + + # parse the config + CONFPARSE: for (@tmccresults) { + /^EVENTSERVER="(.*)"$/ && do { + $eventserver = $1; + }; + } # # Start the event proxy. @@ -148,7 +166,7 @@ sub doboot() if (-x "$BINDIR/evproxy") { print("Starting event proxy daemon\n"); system("$BINDIR/evproxy -i $EVPIDFILE ". - " -s event-server.${domain} -e $pid/$eid"); + " -s $eventserver -e $pid/$eid"); if ($?) { BootFatal("Error running $BINDIR/evproxy"); } -- GitLab