mirror of https://github.com/k3s-io/k3s
Merge pull request #56108 from tpepper/trivial
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. e2e_node: small fixes to setup_host.sh for Ubuntu Trusty **What this PR does / why we need it**: Two small fixes for how nsenter is built from source and installed on Ubuntu Trusty: 1. Use mktemp for the creating the build directory instead of a hard coded name 2. Use current (2.31) util-linux instead of 3+ year old version **Which issue(s) this PR fixes**: Fixes #56106 **Special notes for your reviewer**: See https://github.com/kubernetes/kubernetes/issues/56106 for some thoughts on other ways to address this. My patch for util-linux 2.31 may just be a band-aid? **Release note**: ```release-note NONE ```pull/6/head
commit
6eb6955371
|
@ -57,17 +57,17 @@ cat /etc/*-release | grep "ID=ubuntu"
|
|||
if [ $? -eq 0 ]; then
|
||||
if ! which nsenter > /dev/null; then
|
||||
echo "Do not find nsenter. Install it."
|
||||
mkdir -p /tmp/nsenter-install
|
||||
cd /tmp/nsenter-install
|
||||
curl https://www.kernel.org/pub/linux/utils/util-linux/v2.24/util-linux-2.24.tar.gz | tar -zxf-
|
||||
NSENTER_BUILD_DIR=$(mktemp -d /tmp/nsenter-build-XXXXXX)
|
||||
cd $NSENTER_BUILD_DIR
|
||||
curl https://www.kernel.org/pub/linux/utils/util-linux/v2.31/util-linux-2.31.tar.gz | tar -zxf-
|
||||
sudo apt-get update
|
||||
sudo apt-get --yes install make
|
||||
sudo apt-get --yes install gcc
|
||||
cd util-linux-2.24
|
||||
cd util-linux-2.31
|
||||
./configure --without-ncurses
|
||||
make nsenter
|
||||
sudo cp nsenter /usr/local/bin
|
||||
rm -rf /tmp/nsenter-install
|
||||
rm -rf $NSENTER_BUILD_DIR
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue