[Qa-jenkins-scm] [jenkins.debian.net] 01/01: create jenkins group too and use more sudo

Holger Levsen holger at moszumanska.debian.org
Thu Jul 30 11:05:07 UTC 2015


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 b35b54715066c8e9d8bfd197df73b3b8b63bfed2
Author: Holger Levsen <holger at layer-acht.org>
Date:   Thu Jul 30 13:04:11 2015 +0200

    create jenkins group too and use more sudo
---
 update_jdn.sh | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/update_jdn.sh b/update_jdn.sh
index 4e0b833..fe864bc 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -19,6 +19,7 @@ explain() {
 # set up users and groups
 #
 if ! getent passwd jenkins > /dev/null ; then
+	sudo addgroup --system jenkins
 	sudo adduser --system --no-create-home --ingroup jenkins --disabled-login jenkins
 fi
 if ! getent group jenkins-adm > /dev/null ; then
@@ -35,7 +36,7 @@ for user in helmut holger mattia ; do
 	fi
 done
 
-mkdir -p /srv/workspace
+sudo mkdir -p /srv/workspace
 
 if [ "$HOSTNAME" = "jenkins" ] ; then
 	if ! grep -q '^tmpfs\s\+/srv/workspace\s' /etc/fstab; then
@@ -70,7 +71,7 @@ if ! test -h /chroots; then
 	if test -e /chroots; then
 		explain "could not clear /chroots"
 	else
-		ln -s /srv/workspace/chroots /chroots
+		sudo ln -s /srv/workspace/chroots /chroots
 	fi
 fi
 
@@ -81,7 +82,7 @@ if [ -f /etc/debian_version ] ; then
 		if test -e /var/cache/pbuilder/build; then
 			explain "could not clear /var/cache/pbuilder/build"
 		else
-			ln -s /srv/workspace/pbuilder /var/cache/pbuilder/build
+			sudo ln -s /srv/workspace/pbuilder /var/cache/pbuilder/build
 		fi
 	fi
 
@@ -283,7 +284,7 @@ if [ "$HOSTNAME" = "jenkins" ] ; then
 	diff THANKS .THANKS >/dev/null || asciidoc $ASCIIDOC_PARAMS -o thanks.html THANKS
 	mv THANKS .THANKS
 	rm TODO README INSTALL CONTRIBUTING
-	chown -R jenkins.jenkins /var/lib/jenkins/userContent
+	sudo chown -R jenkins.jenkins /var/lib/jenkins/userContent
 	explain "Updated user content for Jenkins."
 
 	#

-- 
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