From b8f82431b532dcdbcf98f1bb888e7a91b32da2f3 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Mon, 31 Oct 2022 16:02:49 +0100 Subject: [PATCH] Changing output in scripts/chatbot-to-ldap --- scripts/chatbot-to-ldap | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/chatbot-to-ldap b/scripts/chatbot-to-ldap index 8510aaf..e75b14b 100755 --- a/scripts/chatbot-to-ldap +++ b/scripts/chatbot-to-ldap @@ -85,13 +85,13 @@ else fi echo +echo "Handing home directories of existing users ..." for old_account in "${!ACCOUNTS_MIGRATE[@]}" ; do new_account="${ACCOUNTS_MIGRATE[${old_account}]}" old_home="/home/${old_account}" new_home="/home/${new_account}" if [[ -d "${old_home}" ]] ; then - echo "Handling '${old_home}' => '${new_home}' ..." CUR_OWNER=$( stat --format "%U" "${old_home}" ) if [[ "${CUR_OWNER}" != "${new_account}" ]] ; then echo "Chowning \"${old_home}\" to user \"${new_account}\": ..." @@ -103,6 +103,7 @@ for old_account in "${!ACCOUNTS_MIGRATE[@]}" ; do fi fi if [[ "${old_account}" != "${new_account}" ]] ; then + echo "Moving '${old_home}' => '${new_home}' ..." if [[ -d "${new_home}" ]] ; then echo "Cannot move '${old_home}' => '${new_home}', because the target dir is already existing." else @@ -113,6 +114,7 @@ for old_account in "${!ACCOUNTS_MIGRATE[@]}" ; do done echo +echo "Removing home directories of non-existing users ..." for old_account in "${ACCOUNTS_REMOVE[@]}" ; do old_home="/home/${old_account}" @@ -130,3 +132,5 @@ for old_account in "${ACCOUNTS_REMOVE[@]}" ; do fi done +echo +echo "Finished." -- 2.39.5