[Qa-jenkins-scm] [jenkins.debian.net] 01/01: put all users in correct groups
Holger Levsen
holger at moszumanska.debian.org
Mon Jan 11 20:32:33 UTC 2016
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch master
in repository jenkins.debian.net.
commit 100a143e50601f64254c29abbf3671aeef519bdf
Author: Holger Levsen <holger at layer-acht.org>
Date: Mon Jan 11 21:32:19 2016 +0100
put all users in correct groups
---
update_jdn.sh | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/update_jdn.sh b/update_jdn.sh
index 4e42aa3..116f8b1 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -64,6 +64,7 @@ for user in helmut holger mattia lunar philh ; do
# philh only wants to test stuff
continue
fi
+ # actually create the user
if ! getent passwd $user > /dev/null ; then
if [ "$user" = "mattia" ] ; then
usershell=/bin/zsh
@@ -71,12 +72,16 @@ for user in helmut holger mattia lunar philh ; do
usershell=/bin/bash
fi
sudo adduser --gecos "" --shell "$usershell" --disabled-password $user
- if [ "$user" = "holger" ] ; then
- sudo usermod -G jenkins,jenkins-adm,sudo,adm $user
- elif [ "$user" != "lunar" ] ; then
- sudo usermod -G jenkins,jenkins-adm $user
- fi
fi
+ # put user in groups
+ if [ "$HOSTNAME" = "jenkins" ] && [ "$user" = "lunar" ] ; then
+ extra_groups="reproducible"
+ elif [ "$HOSTNAME" = "jenkins" ] ; then
+ extra_groups="reproducible,jenkins,jenkins-adm,sudo,adm"
+ else
+ extra_groups="jenkins,jenkins-adm,sudo,adm"
+ fi
+ sudo usermod -G $extra_groups $user
done
sudo mkdir -p /srv/workspace
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git
More information about the Qa-jenkins-scm
mailing list