forked from Debian/raspi3-image-spec
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path60wifi-fix
executable file
·36 lines (29 loc) · 944 Bytes
/
60wifi-fix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
# vim:ts=2:sw=2:et
# see also:
# https://kernel-handbook.alioth.debian.org/ch-update-hooks.html#s-kernel-hooks
set -e
# Play nice when run under debconf.
exec </dev/null >&2
eval set -- "$DEB_MAINT_PARAMS"
# Only run on configure and remove to avoid unnecessary work.
case "$1" in
configure|remove)
;;
*)
exit 0
;;
esac
if ischroot ; then
true # chroot detected - skip mount point check
elif test -e /usr/bin/systemd-detect-virt && systemd-detect-virt -q ; then
true # virtualization detected - skip mount point check
elif ! mountpoint -q /boot/firmware; then
echo "raspi3-firmware: missing /boot/firmware, did you forget to mount it?" >&2
exit 1
fi
# Ensure the target directory exists. See https://bugs.debian.org/887062
mkdir -p /boot/firmware
if [ -e "/boot/firmware/bcm2837-rpi-3-b-plus.4.16.dtb" ]; then
cp /boot/firmware/bcm2837-rpi-3-b-plus.4.16.dtb /boot/firmware/bcm2710-rpi-3-b-plus.dtb
fi