From 76ae310e7878be175c7aa379685f0554ceabeace Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Mon, 24 Feb 2025 21:41:53 +0100
Subject: [PATCH] Eliminate unnecessary differences.

---
 bookworm/setup_scripts/init_user_and_keybased_login.sh | 1 -
 bookworm/setup_scripts/init_user_login.sh              | 3 +--
 bullseye/setup_scripts/init_user_and_keybased_login.sh | 2 +-
 bullseye/setup_scripts/init_user_login.sh              | 6 +++---
 4 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/bookworm/setup_scripts/init_user_and_keybased_login.sh b/bookworm/setup_scripts/init_user_and_keybased_login.sh
index f2d83ee..358a37e 100755
--- a/bookworm/setup_scripts/init_user_and_keybased_login.sh
+++ b/bookworm/setup_scripts/init_user_and_keybased_login.sh
@@ -48,4 +48,3 @@ sshpass -e ssh root@"${server}" \
         'mv /tmp/authorized_keys /home/plom/.ssh/'
 sshpass -e scp "${local_path_sshd_config}" root@"${server}":"${system_path_sshd_config}"
 sshpass -e ssh root@"${server}" 'service ssh restart'
-
diff --git a/bookworm/setup_scripts/init_user_login.sh b/bookworm/setup_scripts/init_user_login.sh
index f9733ff..3dfc0d5 100755
--- a/bookworm/setup_scripts/init_user_login.sh
+++ b/bookworm/setup_scripts/init_user_login.sh
@@ -8,7 +8,7 @@
 # /etc/ssh/sshd_config.
 #
 # Dependencies: ssh, scp, ~/.ssh/id_rsa.pub, properly configured sshd_config
-# file in misc.sh:local_etc_server$
+# file in misc.sh:$local_etc_server.
 set -e
 . ./misc.sh
 . ../../misc.sh
@@ -37,4 +37,3 @@ ssh root@"${server}" 'chown plom:plom /home/plom/.ssh/authorized_keys'
 # Set up SSH config and remove direct SSH login to root.
 scp "${local_path_sshd_config}" root@"${server}":"${system_path_sshd_config}"
 ssh root@"${server}" 'rm -rf /root/.ssh && service ssh restart'
-
diff --git a/bullseye/setup_scripts/init_user_and_keybased_login.sh b/bullseye/setup_scripts/init_user_and_keybased_login.sh
index 544f3c6..358a37e 100755
--- a/bullseye/setup_scripts/init_user_and_keybased_login.sh
+++ b/bullseye/setup_scripts/init_user_and_keybased_login.sh
@@ -21,7 +21,7 @@ ssh-keygen -f "/home/plom/.ssh/known_hosts" -R "${server}"
 
 # This will be used to log-in as root from plom account.
 printf '\nFirst, enter the old root password; then enter new password three times.\n\n'
-ssh root@"${server}" 'printf "\n" && passwd'
+ssh root@"${server}" 'printf "\n\n" && passwd'
 
 # Save root password for sshpass
 stty -echo
diff --git a/bullseye/setup_scripts/init_user_login.sh b/bullseye/setup_scripts/init_user_login.sh
index b63d0d8..3dfc0d5 100755
--- a/bullseye/setup_scripts/init_user_login.sh
+++ b/bullseye/setup_scripts/init_user_login.sh
@@ -8,7 +8,7 @@
 # /etc/ssh/sshd_config.
 #
 # Dependencies: ssh, scp, ~/.ssh/id_rsa.pub, properly configured sshd_config
-# file in misc.sh:$linkable_files_dir
+# file in misc.sh:$local_etc_server.
 set -e
 . ./misc.sh
 . ../../misc.sh
@@ -24,8 +24,8 @@ eval $(ssh-agent)
 ssh-add
 
 # This will be used to log-in as root from plom account.
-echo 'Asking for new root password.'
-ssh root@"${server}" "passwd"
+printf '\nAsking for new root password.\n\n'
+ssh root@"${server}" 'printf "\n\n" && passwd'
 
 # Set up plom's ~/.ssh/authorized_keys from root's.
 ssh root@"${server}" 'useradd -m plom'
-- 
2.30.2