diff --git a/bin/hardening/8.1.3_audit_bootloader.sh b/bin/hardening/8.1.3_audit_bootloader.sh index 2eaa901..6e0b5af 100755 --- a/bin/hardening/8.1.3_audit_bootloader.sh +++ b/bin/hardening/8.1.3_audit_bootloader.sh @@ -55,17 +55,17 @@ apply () { elif [ $FNRET = 2 ]; then warn "$OPTION is not present in $FILE, add it to $KEYWORD line, need to reboot the system after setting it" sed -i "s;\(${KEYWORD}=\)\(\".*\)\(\"\);\1\2 ${OPTION}=${SETVAL}\3;" $FILE - if [ OS_RELEASE -eq 1 ]; then + if [ $OS_RELEASE -eq 1 ]; then usr/sbin/update-grub2 - elif [ OS_RELEASE -eq 2 ]; then + elif [ $OS_RELEASE -eq 2 ]; then grub2-mkconfig –o /boot/grub2/grub.cfg fi elif [ $FNRET = 3 ]; then warn "Parameter $OPTION is present but with the wrong value -- Fixing, need to reboot the system after setting it" sed -i "s/${OPTION}=./${OPTION}=${SETVAL}/" $FILE - if [ OS_RELEASE -eq 1 ]; then + if [ $OS_RELEASE -eq 1 ]; then usr/sbin/update-grub2 - elif [ OS_RELEASE -eq 2 ]; then + elif [ $OS_RELEASE -eq 2 ]; then grub2-mkconfig –o /boot/grub2/grub.cfg fi fi