Skip to content

Commit

Permalink
Remove RPi version checks
Browse files Browse the repository at this point in the history
Obsolete code at this point.
  • Loading branch information
NJRoadfan committed Jul 5, 2024
1 parent ecea9de commit 86ca33c
Showing 1 changed file with 6 additions and 19 deletions.
25 changes: 6 additions & 19 deletions setup/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ while [[ $1 ]]; do
fi
done

if { [[ -f /usr/local/etc/A2SERVER-version ]] && (( $(head -c 3 /usr/local/etc/A2SERVER-version) < 110 )); }; then
if { [[ -f /usr/local/etc/A2SERVER-version ]] && (( $(head -c 3 /usr/local/etc/A2SERVER-version) < 152 )); }; then
echo
echo "WARNING: The current A2SERVER installer scripts haven't been tested for"
echo "updating the earlier version of A2SERVER that you have. A fresh install"
Expand All @@ -105,28 +105,15 @@ if { [[ -f /usr/local/etc/A2SERVER-version ]] && (( $(head -c 3 /usr/local/etc/A
fi

unsupportedOS=1
if [[ $isRpi ]]; then #supported Raspbian? (16-Feb-15, 20-Jun-14, 09-Jan-14, etc)
fwhash=$(zcat /usr/share/doc/raspberrypi-bootloader/changelog.Debian.gz | grep -m 1 'as of' | awk '{print $NF}')
fwsupported="-8aca5762- -462f3e3f476f7b6- -c32bc633039cd9- -9d34d0475f9-
-d4f5315cfac4e- -6f4a90c8cb8817f- -5dd9b4962e- -17c8799375-
-960832a6c2590635216c296b6ee0bebf67b21d50-
-2a329e0c7d8ea19c085bac5633aa4fccee0f21be-
-b2420fc150ae4616f5d9ec24bdaedc630586a529-"
[[ "$fwsupported" == *-$fwhash-* ]] && unsupportedOS=
# [[ ($fwhash == "8aca5762") || ($fwhash == "462f3e3f476f7b6") || ($fwhash == "c32bc633039cd9") || ($fwhash == "9d34d0475f9") || ($fwhash == "d4f5315cfac4e") || ($fwhash == "6f4a90c8cb8817f") || ($fwhash == "5dd9b4962e") || ($fwhash == "17c8799375") ]] && unsupportedOS=
elif [[ $isDebian ]]; then # supported Debian?

if [[ $isDebian ]]; then # supported Debian?
debianVersion=$(cat /etc/debian_version)
debianSupported="-11.6- -10.11- -9.2- -8.2- -7.9- -7.8- -7.6- -7.3-"
[[ $debianSupported == *-$debianVersion-* ]] && unsupportedOS=
fi

if [[ $unsupportedOS && $isRpi ]]; then
echo
echo "A2SERVER and its installer scripts have been tested on Raspbian Bullseye, Buster,"
echo "Stretch, Jessie, and Wheezy, though not this specific firmware version"
echo "(${fwhash:0:7}). Just FYI."
unsupportedOS=
elif [[ $unsupportedOS && $isDebian ]]; then

if [[ $unsupportedOS && $isDebian ]]; then
echo
echo "A2SERVER and its installer scripts have been tested on Debian 7/8/9/10/11,"
echo "though not this specific point release ($debianVersion). Just FYI."
Expand All @@ -136,7 +123,7 @@ fi
if [[ $unsupportedOS ]]; then
echo
echo "WARNING: A2SERVER and its installer scripts have only been tested on"
echo "Debian and Raspbian. Continuing is probably fine, but might not be."
echo "Debian and RPi OS. Continuing is probably fine, but might not be."
echo "Theoretical worst case would be your operating system no longer works"
echo "properly or data is lost, so consider backing up first."
fi
Expand Down

0 comments on commit 86ca33c

Please sign in to comment.