From 0316d46185dd883a7c453148341b9b10d8aa6708 Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Mon, 4 Nov 2019 16:54:29 -0800 Subject: [PATCH] reproducible: Ensure authorized_keys are processed in the correct directory regardless of where it is run from. --- update_jdn.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/update_jdn.sh b/update_jdn.sh index 16a4a456e..7053bfa59 100755 --- a/update_jdn.sh +++ b/update_jdn.sh @@ -133,7 +133,8 @@ 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 && [ -z "$(find authorized_keys -newer $0)" ] ) || for user in ${users}; do +( $UP2DATE && [ -z "$(find $BASEDIR/authorized_keys -newer $0)" ] ) || for user in ${users}; do + cd $BASEDIR # -v is a bashism to check for set variables, used here to see if this user is active on this host if [ ! -v user_host_groups["$user","$HOSTNAME"] ] && [ ! -v user_host_groups["$user",'*'] ] && [ ! -v user_host_groups["$user","$DPKG_ARCH"] ] ; then continue -- GitLab