[BOOT-5122] Extended password check

This commit is contained in:
Michael Boelen 2016-07-11 11:24:52 +02:00
parent 09a9b80fde
commit 576e11b995
1 changed files with 4 additions and 4 deletions

View File

@ -270,12 +270,12 @@
FIND3=`grep 'set superusers' ${GRUBCONFFILE} | grep -v '^#'`
FIND4=`grep 'password_pbkdf2' ${GRUBCONFFILE} | grep -v '^#'`
FIND5=`grep 'grub.pbkdf2' ${GRUBCONFFILE} | grep -v '^#'`
# GRUB1: MD5 or SHA1
# GRUB1: Password should be set (MD5 or SHA1)
if [ ! "${FIND}" = "" -o ! "${FIND2}" = "" ]; then
FOUND=1
# GRUB2: Superusers and password should be defined
elif [ ! "${FIND3}" = "" -a ! "${FIND4}" = "" ]; then
FOUND=1
# GRUB2: Superusers AND password should be defined
elif [ ! "${FIND3}" = "" ]; then
if [ ! -z "${FIND4}" -o ! -z "${FIND5}" ]; then FOUND=1; fi
fi
if [ ${FOUND} -eq 1 ]; then
Display --indent 4 --text "- Checking for password protection" --result "${STATUS_OK}" --color GREEN