34 lines
965 B
Bash
34 lines
965 B
Bash
#!/bin/sh
|
|
|
|
if [ -e /etc/init.d/switch_cpu_governor ]; then
|
|
update-rc.d switch_cpu_governor remove >/dev/null
|
|
fi
|
|
|
|
if dpkg --compare-versions "${2}" lt-nl "20170619"; then
|
|
update-rc.d -f raspi-config remove
|
|
fi
|
|
|
|
if dpkg --compare-versions "${2}" lt-nl "20220804"; then
|
|
echo "Moving to crda for regulatory domain management..."
|
|
if [ -f /etc/wpa_supplicant/wpa_supplicant.conf ]; then
|
|
REGDOMAIN="$(sed -n 's/^country=\(.*\)$/\1/p' /etc/wpa_supplicant/wpa_supplicant.conf)"
|
|
if [ -n "$REGDOMAIN" ]; then
|
|
echo "Setting to $REGDOMAIN..."
|
|
raspi-config nonint do_wifi_country "$REGDOMAIN"
|
|
else
|
|
echo "Regulatory domain was unset"
|
|
fi
|
|
else
|
|
echo "wpa_cupplicant.conf not found"
|
|
fi
|
|
fi
|
|
|
|
if dpkg --compare-versions "${2}" lt-nl "20220907+1"; then
|
|
IMG_VER="$(grep -s -m1 -o '[[:digit:]]\{4\}-[[:digit:]]\{2\}-[[:digit:]]\{2\}' /etc/rpi-issue)"
|
|
if [ "$IMG_VER" = "2022-09-06" ] && [ -f /2 ]; then
|
|
rm -f /2
|
|
fi
|
|
fi
|
|
|
|
#DEBHELPER#
|