Fix aircrack-ng detection to use apt-cache policy instead of apt-cache show
apt-cache show returns true even when Candidate is (none). Use apt-cache policy and grep for a real version string to correctly skip aircrack-ng on Ubuntu arm64 where it has no install candidate.
This commit is contained in:
@@ -260,11 +260,11 @@ if apt-cache show sshuttle &>/dev/null 2>&1; then
|
||||
PACKAGES+=(sshuttle)
|
||||
fi
|
||||
|
||||
# aircrack-ng not available on all Ubuntu arm64 mirrors — add only if present
|
||||
if apt-cache show aircrack-ng &>/dev/null 2>&1; then
|
||||
# aircrack-ng not available on all Ubuntu arm64 mirrors — add only if a real candidate exists
|
||||
if apt-cache policy aircrack-ng 2>/dev/null | grep -q "Candidate: [^(none)]"; then
|
||||
PACKAGES+=(aircrack-ng)
|
||||
else
|
||||
warn "aircrack-ng not available in apt cache -- skipping (install manually if needed)"
|
||||
warn "aircrack-ng has no install candidate -- skipping (install manually if needed)"
|
||||
fi
|
||||
|
||||
info "Updating package cache..."
|
||||
|
||||
Reference in New Issue
Block a user