summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2016-12-23 15:03:12 +0100
committerHolger Levsen <holger@layer-acht.org>2016-12-23 15:03:12 +0100
commit9b44f1eac886ae17ff21bba66d6f626a7470a0c5 (patch)
tree424a9c1b2ebdc483fce78fa5a1e4451c1dac4182
parent359b43bc5b3ca206f58e1e3c0012811876cc2b38 (diff)
downloadjenkins.debian.net-9b44f1eac886ae17ff21bba66d6f626a7470a0c5.tar.xz
rewrite logic
Signed-off-by: Holger Levsen <holger@layer-acht.org>
-rwxr-xr-xupdate_jdn.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/update_jdn.sh b/update_jdn.sh
index fff13c35..f2db63d8 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -93,7 +93,9 @@ 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
# -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",'*'] -o -v user_host_groups["$user", "$DPKG_ARCH"] ] || continue
+ if [ ! -v user_host_groups["$user","$HOSTNAME"] ] && [ ! -v user_host_groups["$user",'*'] ] && [ -v user_host_groups["$user", "$DPKG_ARCH"] ] ; then
+ continue
+ fi
# create the user
if ! getent passwd $user > /dev/null ; then