move root password check to configuration

This commit is contained in:
Tobias Powalowski 2022-11-25 10:23:26 +01:00
parent 300a11c083
commit 1ac51c841c
2 changed files with 12 additions and 7 deletions

View file

@ -109,9 +109,7 @@ configure_system() {
fi
## END PREPROCESS ##
geteditor || return 1
# check for no root password
chroot "${DESTDIR}" passwd -S root | cut -d ' ' -f2 | grep -q NP && set_password
chroot "${DESTDIR}" passwd -S root | cut -d ' ' -f2 | grep -q L && set_password
check_root_password
FILE=""
# main menu loop

View file

@ -1,5 +1,12 @@
#!/bin/bash
# created by Tobias Powalowski <tpowa@archlinux.org>
check_root_password() {
# check if empty password is set
chroot "${DESTDIR}" passwd -S root | cut -d ' ' -f2 | grep -q NP && set_password
# check if account is locked
chroot "${DESTDIR}" passwd -S root | cut -d ' ' -f2 | grep -q L && set_password
}
set_mkinitcpio() {
DIALOG --msgbox "The mkinitcpio.conf file controls which modules will be placed into the initramfs for your system's kernel.\n\n- Non US keymap users should add 'keymap' to HOOKS= array\n- If you install under VMWARE add 'BusLogic' to MODULES= array\n- raid, lvm2, encrypt are not enabled by default\n- 2 or more disk controllers, please specify the correct module\n loading order in MODULES= array \n\nMost of you will not need to change anything in this file." 15 70
HOOK_ERROR=""