From 81284e65073d7542af43ea1b680c4d9b7708f554 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Tue, 21 Feb 2023 17:37:17 +0100 Subject: [PATCH] Changed output --- scripts/set-ldap-inetuserstatus | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/set-ldap-inetuserstatus b/scripts/set-ldap-inetuserstatus index 7e852c9..6881a6a 100755 --- a/scripts/set-ldap-inetuserstatus +++ b/scripts/set-ldap-inetuserstatus @@ -81,6 +81,9 @@ USER_MAIL= USER_NAME= REQUESTED_STATUS= +UPDATED_USERS=0 +KEPT_USERS=0 + #------------------------------------------------------------------------------ draw_line() { if [[ "${QUIET}" == "y" ]] ; then @@ -404,6 +407,7 @@ setting_user_status() { fi if [[ "${req_user_status}" == "${cur_user_status}" ]] ; then info "Entry '${CYAN}${USER_DN}${NORMAL}' has already the inetUserStatus '${CYAN}${REQUESTED_STATUS}${NORMAL}'." + KEPT_USERS=$(( KEPT_USERS + 1 )) return fi @@ -427,6 +431,7 @@ setting_user_status() { if [[ "${SIMULATE}" != "y" ]] ; then eval $cmd fi + UPDATED_USERS=$(( UPDATED_USERS + 1 )) debug "Done." } @@ -491,6 +496,8 @@ main() { done done + empty_line + info "Updated ${UPDATED_USERS} users, ${KEPT_USERS} not changed." empty_line info "Finished." -- 2.39.5