Skip to content

Commit

Permalink
Improve OS detection for latest Raspberry Pi OS
Browse files Browse the repository at this point in the history
  • Loading branch information
v1s1t0r1sh3r3 committed Aug 7, 2024
1 parent 8a4fbc4 commit 11a38be
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions airgeddon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15230,7 +15230,11 @@ function detect_distro_phase1() {
if uname -a | grep -i "${i}" > /dev/null; then
possible_distro="${i^}"
if [ "${possible_distro}" != "Arch" ]; then
distro="${i^}"
if [[ "$(uname -a)" =~ [Rr]pi ]]; then
distro="Raspberry Pi OS"
else
distro="${i^}"
fi
break
else
if uname -a | grep -i "aarch64" > /dev/null; then
Expand Down Expand Up @@ -15279,7 +15283,7 @@ function detect_distro_phase2() {
elif [[ "${extra_os_info}" =~ [Pp]arrot ]]; then
distro="Parrot arm"
is_arm=1
elif [[ "${extra_os_info}" =~ [Dd]ebian ]] && [[ "$(uname -a)" =~ [Rr]aspberry ]]; then
elif [[ "${extra_os_info}" =~ [Dd]ebian ]] && [[ "$(uname -a)" =~ [Rr]aspberry|[Rr]pi ]]; then
distro="Raspberry Pi OS"
is_arm=1
fi
Expand Down

0 comments on commit 11a38be

Please sign in to comment.