Commit 5256e26f authored by Tim Pepper's avatar Tim Pepper

e2e_node: use mktemp when building nsenter on trusty

There's a bit of a hack in place to insure nsenter is present on Ubuntu trusty, which doesn't otherwise include it. This downloads util-linux to a hard coded directory in /tmp which is a bad practice. Even though "this is just a test case" it should properly use mktemp. Signed-off-by: 's avatarTim Pepper <tpepper@vmware.com>
parent 4956e65d
...@@ -57,8 +57,8 @@ cat /etc/*-release | grep "ID=ubuntu" ...@@ -57,8 +57,8 @@ cat /etc/*-release | grep "ID=ubuntu"
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
if ! which nsenter > /dev/null; then if ! which nsenter > /dev/null; then
echo "Do not find nsenter. Install it." echo "Do not find nsenter. Install it."
mkdir -p /tmp/nsenter-install NSENTER_BUILD_DIR=$(mktemp -d /tmp/nsenter-build-XXXXXX)
cd /tmp/nsenter-install cd $NSENTER_BUILD_DIR
curl https://www.kernel.org/pub/linux/utils/util-linux/v2.24/util-linux-2.24.tar.gz | tar -zxf- curl https://www.kernel.org/pub/linux/utils/util-linux/v2.24/util-linux-2.24.tar.gz | tar -zxf-
sudo apt-get update sudo apt-get update
sudo apt-get --yes install make sudo apt-get --yes install make
...@@ -67,7 +67,7 @@ if [ $? -eq 0 ]; then ...@@ -67,7 +67,7 @@ if [ $? -eq 0 ]; then
./configure --without-ncurses ./configure --without-ncurses
make nsenter make nsenter
sudo cp nsenter /usr/local/bin sudo cp nsenter /usr/local/bin
rm -rf /tmp/nsenter-install rm -rf $NSENTER_BUILD_DIR
fi fi
fi fi
......
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