From e7df3ef75134d4d06b2651d0446f41c5b33a3bc9 Mon Sep 17 00:00:00 2001 From: Jeremy Phelps Date: Tue, 16 Oct 2018 16:26:46 -0500 Subject: [PATCH] Set PATH in Ubuntu 18.04 VM's This is a workaround for a bash 3.4 bug that does not set ~/.local/bin in PATH. Issue-ID: RELENG-1320 Change-Id: I94bcc14f1dcfd1e813e09d1bf448d465549ea04c Signed-off-by: Jeremy Phelps --- jenkins-init-scripts/create-jenkins-user.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jenkins-init-scripts/create-jenkins-user.sh b/jenkins-init-scripts/create-jenkins-user.sh index 40ac25f3..00052442 100755 --- a/jenkins-init-scripts/create-jenkins-user.sh +++ b/jenkins-init-scripts/create-jenkins-user.sh @@ -10,6 +10,13 @@ ############################################################################## OS=$(facter operatingsystem | tr '[:upper:]' '[:lower:]') +OS_RELEASE=$(facter lsbdistrelease | tr '[:upper:]' '[:lower:]') + +if [[ "$OS_RELEASE" == "18.04" ]] && [[ "$OS" == 'ubuntu' ]] +then + echo 'PATH=$HOME/.local/bin:$PATH +export PATH' >> /etc/profile +fi useradd -m -s /bin/bash jenkins -- 2.16.6