Merge pull request #91 from Dragon8oy/boot-fix

Fix --boot not saving through authentication
This commit is contained in:
Vince 2020-10-17 20:41:55 +08:00 committed by GitHub
commit 026b20a394
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -195,7 +195,11 @@ install() {
read -p "[ Trusted ] Specify the root password : " -t${MAX_DELAY} -s read -p "[ Trusted ] Specify the root password : " -t${MAX_DELAY} -s
[[ -n "$REPLY" ]] && { [[ -n "$REPLY" ]] && {
if [[ -n "${theme}" && -n "${screen}" ]]; then if [[ -n "${theme}" && -n "${screen}" ]]; then
if [[ ${THEME_DIR} == '/boot/grub/themes' ]]; then
sudo -S <<< $REPLY $0 --boot --${theme} --${icon} --${screen} --${custom_background}
else
sudo -S <<< $REPLY $0 --${theme} --${icon} --${screen} --${custom_background} sudo -S <<< $REPLY $0 --${theme} --${icon} --${screen} --${custom_background}
fi
fi fi
} || { } || {
operation_canceled operation_canceled
@ -342,7 +346,11 @@ remove() {
read -p "[ trusted ] specify the root password : " -t${MAX_DELAY} -s read -p "[ trusted ] specify the root password : " -t${MAX_DELAY} -s
[[ -n "$REPLY" ]] && { [[ -n "$REPLY" ]] && {
if [[ -n "${theme}" ]]; then if [[ -n "${theme}" ]]; then
sudo -S <<< $REPLY $0 --remove --${theme} if [[ ${THEME_DIR} == '/boot/grub/themes' ]]; then
sudo -S <<< $REPLY $0 --remove --boot --${theme}
else
sudo -S <<< $REPLY $0 --remove --${theme}
fi
fi fi
} || { } || {
operation_canceled operation_canceled