Commit b6e0952e authored by Elijah Grubb's avatar Elijah Grubb

Fixing errors in emulabizing Docker images

Fixed issue with cmd and entrypoint values being set
incorrectly

Fixed issue with rcS init.d process negatively hurting
our networking settings.

Better handling of whitespace in Environment variable
values.

Squashed commit of the following:

commit 9aff9b12aa6a60ebb66f10f0a044bf2288b492be
Author: Elijah Grubb <u0894728@utah.edu>
Date:   Wed May 9 19:15:40 2018 -0600

    Handling environment variable values with whitespace

commit c9a16bbd53c183d7f8259d878efb0be07bc8703c
Author: Elijah Grubb <u0894728@utah.edu>
Date:   Wed May 9 17:07:43 2018 -0600

    Fixing racing issue and rcs issue

commit 10bf4517c419fc82f89d084c4f45d60c05a67834
Author: Elijah Grubb <u0894728@utah.edu>
Date:   Wed May 9 16:00:45 2018 -0600

    Setting cmd to be empty and entrypoint to be runit
parent ccd50cbe
......@@ -30,6 +30,10 @@
# suit our purposes, but not any other kind of sshd).
#
# Docker attach is sometimes racy so give it observer a chance to attach
# before printing output
sleep 4
#
# Find the distro, release number, etc.
#
......
{
"Cmd": [ "/sbin/init-runit.sh" ]
"Entrypoint": [ "/sbin/init-runit.sh" ],
"Cmd": []
}
{
"Cmd": [ "/sbin/init-runit.sh" ]
"Entrypoint": [ "/sbin/init-runit.sh" ],
"Cmd": []
}
......@@ -4,8 +4,8 @@
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
/etc/init.d/rcS
/etc/init.d/rmnologin
# /etc/init.d/rcS
# /etc/init.d/rmnologin
touch /etc/runit/stopit
chmod 0 /etc/runit/stopit
{
"Cmd": [ "/sbin/init-runit.sh" ]
"Entrypoint": [ "/sbin/init-runit.sh" ],
"Cmd": []
}
{
"Cmd": [ "/sbin/init-runit.sh" ]
"Entrypoint": [ "/sbin/init-runit.sh" ],
"Cmd": []
}
{
"Cmd": [ "/sbin/init-runit.sh" ]
"Entrypoint": [ "/sbin/init-runit.sh" ],
"Cmd": []
}
{
"Cmd": [ "/sbin/init-runit.sh" ]
"Entrypoint": [ "/sbin/init-runit.sh" ],
"Cmd": []
}
......@@ -4834,7 +4834,15 @@ sub emulabizeImage($;$$$$$$$$)
$dockerenvironmentvars = $iattrs{DOCKER_ENV};
foreach my $elem (@$dockerenvironmentvars) {
print $runitfile "export ";
print $runitfile $elem;
my $elemname;
my $elemvalue;
$elemname = substr($elem, 0, index($elem, '='));
$elemvalue = substr($elem, index($elem, '=') + 1);
print $runitfile $elemname;
print $runitfile "=";
print $runitfile "\"";
print $runitfile $elemvalue;
print $runitfile "\"";
print $runitfile "\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