From 9393d412c2d44ccc1a648afa5e47f8e214928fe6 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Fri, 25 Nov 2022 10:57:26 +0100 Subject: [PATCH] new set root password logic --- usr/lib/archboot/installer/configuration.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/usr/lib/archboot/installer/configuration.sh b/usr/lib/archboot/installer/configuration.sh index 6a280d444..5e026f387 100644 --- a/usr/lib/archboot/installer/configuration.sh +++ b/usr/lib/archboot/installer/configuration.sh @@ -37,11 +37,17 @@ set_locale() { set_password() { PASSWORD="" + PASS="" + PASS2="" while [[ "${PASSWORD}" = "" ]]; do - DIALOG --insecure --passwordbox "Enter root password:" 0 0 2>"${ANSWER}" || return 1 - PASS=$(cat "${ANSWER}") - DIALOG --insecure --passwordbox "Retype root password:" 0 0 2>"${ANSWER}" || return 1 - PASS2=$(cat "${ANSWER}") + while [[ "${PASS}" = "" ]]; do + DIALOG --insecure --passwordbox "Enter new root password:" 0 0 2>"${ANSWER}" || return 1 + PASS=$(cat "${ANSWER}") + done + while [[ "${PASS2}" = "" ]]; do + DIALOG --insecure --passwordbox "Retype new root password:" 0 0 2>"${ANSWER}" || return 1 + PASS2=$(cat "${ANSWER}") + done if [[ "${PASS}" = "${PASS2}" ]]; then PASSWORD=${PASS} echo "${PASSWORD}" > /tmp/.password