diff options
Diffstat (limited to 'debian/signing-template/@final_pkg_name@.postrm.in')
-rwxr-xr-x[-rw-r--r--] | debian/signing-template/@final_pkg_name@.postrm.in | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/debian/signing-template/@final_pkg_name@.postrm.in b/debian/signing-template/@final_pkg_name@.postrm.in index cd261b15..2da291d8 100644..100755 --- 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 |