do various final check only if base installed

This commit is contained in:
Bernhard Landauer 2017-03-05 21:35:09 +01:00
parent b308bc90a0
commit 2a9b05cac8

View File

@ -425,22 +425,30 @@ final_check() {
CHECKLIST=/tmp/.final_check
# Empty the list
echo "" > ${CHECKLIST}
# Check if base is installed
[[ -e /mnt/.base_installed ]] || echo "- Base is not installed" >> ${CHECKLIST}
# Check if bootloader is installed
if [[ $SYSTEM == "BIOS" ]]; then
arch_chroot "pacman -Qq grub" &> /dev/null || echo "- Bootloader is not installed" >> ${CHECKLIST}
if [[ ! -e /mnt/.base_installed ]]; then
echo "- Base is not installed" >> ${CHECKLIST}
else
[[ -e /mnt/boot/efi/EFI/manjaro_grub/grubx64.efi ]] || [[ -e /mnt/boot/EFI/manjaro_grub/grubx64.efi ]] || echo "- Bootloader is not installed" >> ${CHECKLIST}
# Check if bootloader is installed
if [[ $SYSTEM == "BIOS" ]]; then
arch_chroot "pacman -Qq grub" &> /dev/null || echo "- Bootloader is not installed" >> ${CHECKLIST}
else
[[ -e /mnt/boot/efi/EFI/manjaro_grub/grubx64.efi ]] || [[ -e /mnt/boot/EFI/manjaro_grub/grubx64.efi ]] || echo "- Bootloader is not installed" >> ${CHECKLIST}
fi
# Check if fstab is generated
$(grep -qv '^#' /mnt/etc/fstab 2>/dev/null) || echo "- Fstab has not been generated" >> ${CHECKLIST}
# Check if locales have been generated
[[ $(manjaro-chroot /mnt 'locale -a' | wc -l) -ge '3' ]] || echo "- Locales have not been generated" >> ${CHECKLIST}
# Check if root password has been set
manjaro-chroot /mnt 'passwd --status root' | cut -d' ' -f2 | grep -q 'NP' && echo "- Root password is not set" >> ${CHECKLIST}
# check if user account has been generated
[[ $(ls /mnt/home 2>/dev/null) == "" ]] && echo "- No user accounts have been generated" >> ${CHECKLIST}
fi
# Check if fstab is generated
$(grep -qv '^#' /mnt/etc/fstab 2>/dev/null) || echo "- Fstab has not been generated" >> ${CHECKLIST}
# Check if locales have been generated
[[ $(manjaro-chroot /mnt 'locale -a' | wc -l) -ge '3' ]] || echo "- Locales have not been generated" >> ${CHECKLIST}
# Check if root password has been set
manjaro-chroot /mnt 'passwd --status root' | cut -d' ' -f2 | grep -q 'NP' && echo "- Root password is not set" >> ${CHECKLIST}
# check if user account has been generated
[[ $(ls /mnt/home 2>/dev/null) == "" ]] && echo "- No user accounts have been generated" >> ${CHECKLIST}
}
exit_done() {