Set PATH in Ubuntu 18.04 VM's 12/13012/4
authorJeremy Phelps <jphelps@linuxfoundation.org>
Tue, 16 Oct 2018 21:26:46 +0000 (16:26 -0500)
committerJeremy Phelps <jphelps@linuxfoundation.org>
Wed, 17 Oct 2018 18:55:09 +0000 (13:55 -0500)
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 <jphelps@linuxfoundation.org>
jenkins-init-scripts/create-jenkins-user.sh

index 40ac25f..0005244 100755 (executable)
 ##############################################################################
 
 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