mirror of
https://git.proxmox.com/git/fwupd
synced 2025-07-27 07:52:24 +00:00

Rename the plugin to make it clearer of the scope. Based on a patch from Mario Limonciello <mario.limonciello@dell.com>
41 lines
1.2 KiB
Bash
41 lines
1.2 KiB
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
#DEBHELPER#
|
|
|
|
if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then
|
|
dpkg-maintscript-helper rm_conffile \
|
|
/etc/fwupd.conf 1.0.0~ -- "$@"
|
|
dpkg-maintscript-helper rm_conffile \
|
|
/etc/fwupd/remotes.d/fwupd.conf 1.2.7~ -- "$@"
|
|
dpkg-maintscript-helper rm_conffile \
|
|
/etc/dbus-1/system.d/org.freedesktop.fwupd.conf 1.3.2~ -- "$@"
|
|
fi
|
|
|
|
if dpkg-maintscript-helper supports mv_conffile 2>/dev/null; then
|
|
dpkg-maintscript-helper mv_conffile \
|
|
/etc/fwupd/uefi.conf /etc/fwupd/uefi_capsule.conf 1.5.5~ -- "$@"
|
|
|
|
fi
|
|
|
|
# Clean up from fwupdate->fwupd transition
|
|
# This can be removed after bullseye and focal are released
|
|
EFIDIR=$(dpkg-vendor --query vendor | awk '{ print tolower($$0) }')
|
|
if [ "${DPKG_MAINTSCRIPT_ARCH}" = "amd64" ]; then
|
|
EFI_NAME=x64
|
|
elif [ "${DPKG_MAINTSCRIPT_ARCH}" = "i386" ]; then
|
|
EFI_NAME=ia32
|
|
elif [ "${DPKG_MAINTSCRIPT_ARCH}" = "arm64" ]; then
|
|
EFI_NAME=aa64
|
|
elif [ "${DPKG_MAINTSCRIPT_ARCH}" = "armhf" ]; then
|
|
EFI_NAME=arm
|
|
fi
|
|
rm -f /boot/efi/EFI/$EFIDIR/fwup$EFI_NAME.efi
|
|
rm -f /var/lib/fwupdate/done
|
|
rm -f /var/cache/fwupdate/done
|
|
for dir in /var/cache/fwupdate /var/lib/fwupdate; do
|
|
if [ -d $dir ]; then
|
|
rmdir --ignore-fail-on-non-empty $dir || true
|
|
fi
|
|
done
|