Refactored helpers to reduce duplication and improve naming.

- Renamed chroot_install/chroot_enable to chroot_pacman_install/chroot_systemd_enable.
- Made chroot_systemd_enable auto-print status, removing need for wrapper functions.
- Used generic prompt helpers instead of duplicating logic in specialized functions.
- Inlined and removed single-use wrapper functions throughout.
This commit is contained in:
2026-01-17 10:58:37 -05:00
parent 6b70ce8a97
commit f6fe732b4b
8 changed files with 40 additions and 110 deletions

View File

@@ -98,24 +98,9 @@ close_luks_container() {
# Returns:
# 0 on success, 1 on mismatch
prompt_encryption_password() {
local password
local password_confirm
print "Please enter your desired encryption passphrase."
read -rs password
echo
print "Please confirm your encryption passphrase."
read -rs password_confirm
echo
if [ "$password" != "$password_confirm" ]; then
print_error "Passphrases do not match."
if ! prompt_password "Please enter your desired encryption passphrase." ENCRYPTION_PASSWORD; then
return 1
fi
ENCRYPTION_PASSWORD="$password"
unset password password_confirm
return 0
}