summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve McIntyre <steve@einval.com>2021-05-06 00:40:56 +0100
committerSteve McIntyre <steve@einval.com>2021-05-08 00:14:11 +0100
commita92474d9d8b1131912100e5f83ab98cd30b53eb8 (patch)
tree97e4aca2e30db82ff3eb4cf0e59ed4bc3dbc33e3
parentbca31a61b53feeb9f6dd19c9307186d69cfdb30d (diff)
downloadefi-boot-shim-debian/15.4-5_deb10u1.tar.gz
efi-boot-shim-debian/15.4-5_deb10u1.zip
Add defensive code around calls to db_getdebian/15.4-5_deb10u1
Don't fail if they return errors.
-rw-r--r--debian/changelog9
-rwxr-xr-xdebian/signing-template/@final_pkg_name@.postinst.in4
2 files changed, 10 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index 4d1e81d9..c7ef5835 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,11 @@
-shim (15.4-4~deb10u1) buster; urgency=medium
+shim (15.4-5~deb10u1) buster; urgency=medium
+
+ * Add defensive code around calls to db_get. Don't fail if they
+ return errors.
+
+ -- Steve McIntyre <93sam@debian.org> Sat, 08 May 2021 00:14:00 +0100
+
+shim (15.4-4~deb10u1) unstable; urgency=medium
* Fix up those maintainer scripts - if we're not running on an EFI
system then exit cleanly.
diff --git a/debian/signing-template/@final_pkg_name@.postinst.in b/debian/signing-template/@final_pkg_name@.postinst.in
index 17f54c87..3e8e53f7 100755
--- a/debian/signing-template/@final_pkg_name@.postinst.in
+++ b/debian/signing-template/@final_pkg_name@.postinst.in
@@ -64,12 +64,12 @@ case $1 in
# call grub-install safely without dropping them
OPTIONS=""
- db_get grub2/force_efi_extra_removable
+ db_get grub2/force_efi_extra_removable || RET=false
if [ "$RET" = true ]; then
OPTIONS="$OPTIONS --force-extra-removable"
fi
- db_get grub2/update_nvram
+ db_get grub2/update_nvram || RET=true
if [ "$RET" = false ]; then
OPTIONS="$OPTIONS --no-nvram"
fi