]> Frank Brehm's Git Trees - pixelpark/pp-admin-tools.git/commitdiff
Changing output in scripts/chatbot-to-ldap
authorFrank Brehm <frank.brehm@pixelpark.com>
Mon, 31 Oct 2022 15:02:49 +0000 (16:02 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Mon, 31 Oct 2022 15:02:49 +0000 (16:02 +0100)
scripts/chatbot-to-ldap

index 8510aaf9c4b230c5c979e0b8fc6e16c66da377f8..e75b14ba716ef11579c12df2f01bfb5fdb0a672a 100755 (executable)
@@ -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."