Improve handling of x86 splash command line

This commit is contained in:
Simon Long 2017-05-18 13:24:03 +01:00
parent febb2ef0c6
commit 2a1675e06d
2 changed files with 30 additions and 7 deletions

12
debian/changelog vendored
View File

@ -1,3 +1,15 @@
raspi-config (20170518) jessie; urgency=medium
* Improve x86 splash screen command line handling to remove spurious arguments and spaces
-- Simon Long <simon@raspberrypi.org> Thu, 18 May 2017 13:19:27 +0100
raspi-config (20170503) jessie; urgency=medium
* Correctly handle GRUB command line options for splash screen on x86
-- Simon Long <simon@raspberrypi.org> Wed, 03 May 2017 11:30:57 +0100
raspi-config (20170307) jessie; urgency=medium
* Run init_resize.sh through shellcheck

View File

@ -980,10 +980,18 @@ EOF
}
get_boot_splash() {
if grep -q "splash" $CMDLINE ; then
echo 0
if is_pi ; then
if grep -q "splash" $CMDLINE ; then
echo 0
else
echo 1
fi
else
echo 1
if grep -q "GRUB_CMDLINE_LINUX_DEFAULT.*splash" /etc/default/grub ; then
echo 0
else
echo 1
fi
fi
}
@ -1011,6 +1019,8 @@ do_boot_splash() {
fi
else
sed -i /etc/default/grub -e "s/GRUB_CMDLINE_LINUX_DEFAULT=\"\(.*\)\"/GRUB_CMDLINE_LINUX_DEFAULT=\"\1 quiet splash plymouth.ignore-serial-consoles\"/"
sed -i /etc/default/grub -e "s/ \+/ /g"
sed -i /etc/default/grub -e "s/GRUB_CMDLINE_LINUX_DEFAULT=\" /GRUB_CMDLINE_LINUX_DEFAULT=\"/"
update-grub
fi
STATUS=enabled
@ -1022,10 +1032,11 @@ do_boot_splash() {
sed -i $CMDLINE -e "s/ plymouth.ignore-serial-consoles//"
fi
else
sed -i /etc/default/grub -e "s/GRUB_CMDLINE_LINUX_DEFAULT=\"\(.*\) quiet\(.*\)\"/GRUB_CMDLINE_LINUX_DEFAULT=\"\1 \2\"/"
sed -i /etc/default/grub -e "s/GRUB_CMDLINE_LINUX_DEFAULT=\"\(.*\) splash\(.*\)\"/GRUB_CMDLINE_LINUX_DEFAULT=\"\1 \2\"/"
sed -i /etc/default/grub -e "s/GRUB_CMDLINE_LINUX_DEFAULT=\"\(.*\) plymouth.ignore-serial-consoles\(.*\)\"/GRUB_CMDLINE_LINUX_DEFAULT=\"\1 \2\"/"
sed -i /etc/default/grub -e "s/GRUB_CMDLINE_LINUX_DEFAULT=\" *\"/GRUB_CMDLINE_LINUX_DEFAULT=\"\"/"
sed -i /etc/default/grub -e "s/GRUB_CMDLINE_LINUX_DEFAULT=\"\(.*\)quiet\(.*\)\"/GRUB_CMDLINE_LINUX_DEFAULT=\"\1\2\"/"
sed -i /etc/default/grub -e "s/GRUB_CMDLINE_LINUX_DEFAULT=\"\(.*\)splash\(.*\)\"/GRUB_CMDLINE_LINUX_DEFAULT=\"\1\2\"/"
sed -i /etc/default/grub -e "s/GRUB_CMDLINE_LINUX_DEFAULT=\"\(.*\)plymouth.ignore-serial-consoles\(.*\)\"/GRUB_CMDLINE_LINUX_DEFAULT=\"\1\2\"/"
sed -i /etc/default/grub -e "s/ \+/ /g"
sed -i /etc/default/grub -e "s/GRUB_CMDLINE_LINUX_DEFAULT=\" /GRUB_CMDLINE_LINUX_DEFAULT=\"/"
update-grub
fi
STATUS=disabled