Commit 2cfdb6d7 authored by Elijah Grubb's avatar Elijah Grubb

Added support for custom HOME and HOSTNAME params

parent 17a09142
......@@ -5062,8 +5062,14 @@ sub emulabizeImage($;$$$$$$$$$)
print $runitfile "export USER=";
print $runitfile $dockeruser;
print $runitfile "\n";
print $runitfile "export HOME=/home/";
print $runitfile $dockeruser;
print $runitfile "export ";
my @retlines;
my $rc = analyzeImageWithBusyboxCommand($image,{},\@retlines,"env");
for my $line (@retlines) {
if (substr($line, 0, index($line, '=')) eq "HOME") {
print $runitfile $line;
}
}
print $runitfile "\n";
}
else {
......@@ -5073,7 +5079,16 @@ sub emulabizeImage($;$$$$$$$$$)
print $runitfile "export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";
print $runitfile ':$PATH';
print $runitfile "\n\n";
print $runitfile "\n";
my ($pid,$eid,$vname) = check_nickname();
my ($DOMAINNAME,undef) = tmccbossinfo();
my $longdomain = "${eid}.${pid}.${DOMAINNAME}";
my $hostname = "$vname.$longdomain";
print $runitfile "export HOSTNAME=";
print $runitfile $hostname;
print $runitfile "\n\n\n";
# let's add in all the environment variables in the Dockerfile
if (exists($iattrs{DOCKER_ENV})) {
......
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