From: Jeremy Phelps Date: Tue, 16 Oct 2018 21:26:46 +0000 (-0500) Subject: Set PATH in Ubuntu 18.04 VM's X-Git-Tag: v0.26.0~3 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=e7df3ef75134d4d06b2651d0446f41c5b33a3bc9;p=releng%2Fglobal-jjb.git 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 --- 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