install_bin: do exec test after elf test

This commit is contained in:
bol-van 2025-05-28 23:06:12 +03:00
parent 6c9ff2010b
commit 38a3833351

View File

@ -82,7 +82,11 @@ check_dir()
;;
elf)
out=$(read_elf_arch "$exe")
[ "$ELF_ARCH" = "$out" ]
[ "$ELF_ARCH" = "$out" ] && {
# exec test to verify it actually works. no illegal instruction or crash.
out=$(echo 0.0.0.0 | "$exe" 2>/dev/null)
[ -n "$out" ]
}
;;
find)
out=$(echo 0.0.0.0 | $FIND "$dir" -maxdepth 1 -name ip2net -exec {} \; 2>/dev/null)