Code Review
/
releng
/
global-jjb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix: Address various shellcheck linting errors in scripts
[releng/global-jjb.git]
/
jenkins-init-scripts
/
create-jenkins-user.sh
diff --git
a/jenkins-init-scripts/create-jenkins-user.sh
b/jenkins-init-scripts/create-jenkins-user.sh
index
e1e0b1e
..
980eacf
100755
(executable)
--- a/
jenkins-init-scripts/create-jenkins-user.sh
+++ b/
jenkins-init-scripts/create-jenkins-user.sh
@@
-13,7
+13,9
@@
OS=$(facter operatingsystem | tr '[:upper:]' '[:lower:]')
OS_RELEASE=$(facter lsbdistrelease | tr '[:upper:]' '[:lower:]')
if [[ "$OS_RELEASE" == "18.04" && "$OS" == 'ubuntu' ]]; then
OS_RELEASE=$(facter lsbdistrelease | tr '[:upper:]' '[:lower:]')
if [[ "$OS_RELEASE" == "18.04" && "$OS" == 'ubuntu' ]]; then
- echo 'export PATH=$HOME/.local/bin:$PATH' >> /etc/profile
+ # We do not want var expansion here as profile script expands at runtime.
+ # shellcheck disable=SC2016
+ echo 'export PATH=$HOME/.local/bin:$PATH' >> /etc/profile
fi
useradd -m -s /bin/bash jenkins
fi
useradd -m -s /bin/bash jenkins