Fix a bug for 8.1.3

This commit is contained in:
Samson-W 2020-01-07 13:39:10 +08:00
parent ae142b1cf9
commit f5b0d991c4

View File

@ -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