From fca690565375b167d947e53d15ffdcf93fbee181 Mon Sep 17 00:00:00 2001 From: Steve McIntyre Date: Tue, 4 May 2021 14:45:00 +0100 Subject: Fix up the template maintainer scripts if we're not running on an EFI system then exit cleanly --- debian/signing-template/@final_pkg_name@.postrm.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) mode change 100644 => 100755 debian/signing-template/@final_pkg_name@.postrm.in (limited to 'debian/signing-template/@final_pkg_name@.postrm.in') diff --git a/debian/signing-template/@final_pkg_name@.postrm.in b/debian/signing-template/@final_pkg_name@.postrm.in old mode 100644 new mode 100755 index cd261b15..2da291d8 --- a/debian/signing-template/@final_pkg_name@.postrm.in +++ b/debian/signing-template/@final_pkg_name@.postrm.in @@ -1,6 +1,11 @@ #! /bin/sh set -e +# If we're not on an EFI system, do nothing +if [ ! -d /sys/firmware/efi ]; then + exit 0 +fi + case @arch@ in i386) SHIM_REMOVE="mmia32.efi fbia32.efi";; @@ -39,8 +44,7 @@ case $1 in # If we're being removed, remove the copies installed in the # ESP. grub-install doesn't clean those up for us. if [ "$bootloader_id" ] && \ - [ -d "/boot/efi/EFI/$bootloader_id" ] && \ - [ -d /sys/firmware/efi ]; then + [ -d "/boot/efi/EFI/$bootloader_id" ]; then cd /boot/efi/EFI/$bootloader_id rm -f $SHIM_REMOVE -- cgit v1.2.3