package-pipelines-miscellan.../linux-diversion-ath-regd-optional/debian/postrm

21 lines
692 B
Text
Raw Permalink Normal View History

2023-12-05 23:40:22 +01:00
#!/bin/sh
set -e
if [ remove != "$1" -a abort-install != "$1" -a disappear != "$1" ]; then
exit 0
fi
dpkg-divert --package linux-diversion-__DEB_VERSION__-ath-regd-optional --remove --rename --divert \
/lib/modules/__DEB_VERSION__-amd64/kernel/drivers/net/wireless/ath/ath.ko.orig \
/lib/modules/__DEB_VERSION__-amd64/kernel/drivers/net/wireless/ath/ath.ko
depmod __DEB_VERSION__-amd64
if [ -d /var/run ]; then
touch /var/run/reboot-required
if ! grep -q "^linux-diversion-__DEB_VERSION__-ath-regd-optional$" /var/run/reboot-required.pkgs 2> /dev/null ; then
echo "linux-diversion-__DEB_VERSION__-ath-regd-optional" >> /var/run/reboot-required.pkgs
fi
fi