| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
set -e |
| 4 |
|
| 5 |
if [ "$1" = "configure" ]; then |
| 6 |
# d-i currently installs its copies of regulatory.db{,.p7s} as |
| 7 |
# regular files, which we need to remove before running |
| 8 |
# update-alternatives |
| 9 |
if dpkg --compare-versions "$2" lt 2022.04.08-2~; then |
| 10 |
for file in regulatory.db regulatory.db.p7s; do |
| 11 |
if [ ! -L /lib/firmware/"$file" ] || \ |
| 12 |
[ "$(readlink /lib/firmware/"$file")" != \ |
| 13 |
/etc/alternatives/"$file" ]; then |
| 14 |
rm -f /lib/firmware/"$file" |
| 15 |
fi |
| 16 |
done |
| 17 |
fi |
| 18 |
|
| 19 |
# Alternative paths should *not* be moved under /usr/lib |
| 20 |
update-alternatives --install \ |
| 21 |
/lib/firmware/regulatory.db regulatory.db /lib/firmware/regulatory.db-debian 100 \ |
| 22 |
--slave /lib/firmware/regulatory.db.p7s regulatory.db.p7s /lib/firmware/regulatory.db.p7s-debian |
| 23 |
update-alternatives --install \ |
| 24 |
/lib/firmware/regulatory.db regulatory.db /lib/firmware/regulatory.db-upstream 50 \ |
| 25 |
--slave /lib/firmware/regulatory.db.p7s regulatory.db.p7s /lib/firmware/regulatory.db.p7s-upstream |
| 26 |
fi |
| 27 |
|
| 28 |
#DEBHELPER# |