[Qa-jenkins-scm] [jenkins.debian.net] 01/01: update_jdn: deploy the users also when only a ssh key changes

Holger Levsen holger at layer-acht.org
Sat Oct 8 18:24:09 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 321b68cf7639c584ed5a200b831da21e2af131e9
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Sat Oct 8 16:09:59 2016 +0000

    update_jdn: deploy the users also when only a ssh key changes
    
    this makes possible to add/remove/edit a ssh key and have it deployed also when $UP2DATE is otherwise true.
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 update_jdn.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/update_jdn.sh b/update_jdn.sh
index 6be6b2a..f090317 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -85,7 +85,7 @@ u_shell['jenkins-adm']='/bin/bash'
 # get the users out of the user_host_groups array's index
 users=$(for i in ${!user_host_groups[@]}; do echo ${i%,*} ; done | sort -u)
 
-$UP2DATE || for user in ${users}; do
+( $UP2DATE && [ -z $(find authorized_keys -newer $0) ] ) || for user in ${users}; do
 	# -v is a bashism to check for set variables, used here to see if this user is active on this host
 	[ -v user_host_groups["$user","$HOSTNAME"] -o -v user_host_groups["$user",'*'] ] || continue
 

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