summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve McIntyre <steve@einval.com>2021-05-06 00:52:51 +0100
committerSteve McIntyre <steve@einval.com>2021-05-06 00:52:51 +0100
commit73769cac915948b2bbe46ffe5edc318fcd8ed8f1 (patch)
tree845bd8702d6a46a30b5d61516472f7e8eba66372
parenta4168ea0011b3530c6e889dd8d8a57e7e445b946 (diff)
downloadshim-signed-73769cac915948b2bbe46ffe5edc318fcd8ed8f1.tar.gz
shim-signed-73769cac915948b2bbe46ffe5edc318fcd8ed8f1.zip
Add defensive code around calls to db_get
Don't fail if they return errors. Closes: #988114
-rw-r--r--debian/changelog7
-rwxr-xr-xdebian/shim-signed.postinst4
-rwxr-xr-xdebian/shim-signed.postrm6
3 files changed, 12 insertions, 5 deletions
diff --git a/debian/changelog b/debian/changelog
index 5ae48b3..5026513 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+shim-signed (1.36) unstable; urgency=medium
+
+ * Add defensive code around calls to db_get. Don't fail if they
+ return errors. Closes: #988114
+
+ -- Steve McIntyre <93sam@debian.org> Thu, 06 May 2021 00:50:02 +0100
+
shim-signed (1.35) unstable; urgency=medium
* Add explicit dependency from shim-signed to shim-signed-common.
diff --git a/debian/shim-signed.postinst b/debian/shim-signed.postinst
index 75eff51..f850043 100755
--- a/debian/shim-signed.postinst
+++ b/debian/shim-signed.postinst
@@ -66,12 +66,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
diff --git a/debian/shim-signed.postrm b/debian/shim-signed.postrm
index 431a5db..a161df8 100755
--- a/debian/shim-signed.postrm
+++ b/debian/shim-signed.postrm
@@ -69,15 +69,15 @@ case $1 in
# call grub-install 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
+ fi
grub-install --target=${GRUB_EFI_TARGET} $OPTIONS
if dpkg --compare-versions "$2" lt-nl "1.22~"; then