From c3ea44ac27f6b0c3d2d685a611731b4c0630e65a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20COUDERC?= Date: Fri, 7 Jul 2017 10:03:03 +0000 Subject: [PATCH] Improve detection of grub efi to choose default background ratio. --- debian/changelog | 6 ++++++ debian/postinst | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 89d5f48..15f530d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +desktop-base (9.0.6) UNRELEASED; urgency=medium + + * Improve detection of grub efi to choose default background ratio. + + -- Aurélien COUDERC Thu, 06 Jul 2017 17:09:44 +0200 + desktop-base (9.0.5) unstable; urgency=medium * Ensure postinst doesn’t fails on upgrade even when an incomplete theme pack diff --git a/debian/postinst b/debian/postinst index b240074..ebd2118 100644 --- a/debian/postinst +++ b/debian/postinst @@ -165,11 +165,16 @@ EOF # Set up an alternative for the GRUB background/colors config # Highest priority for active theme ## Favor widescreen / hi-res background for efi installations - num_grub_efi_installed=$(dpkg-query --list "grub-efi*" 2> /dev/null | grep "^i" | wc -l) + grub_installed_query="dpkg-query --list grub-efi*" + echo "Detecting installed grub-efi* packages..." + ${grub_installed_query} || true # log packages found if any + num_grub_efi_installed=$(${grub_installed_query} 2> /dev/null | grep "^i" | wc -l) if [ $num_grub_efi_installed -gt 0 ] ; then + echo "grub-efi found, using 16/9 as default grub background ratio" grub_first_ratio="16x9" grub_second_ratio="4x3" else + echo "grub-efi not found, using 4/3 as default grub background ratio" grub_first_ratio="4x3" grub_second_ratio="16x9" fi