mirror of
https://github.com/opnsense/src.git
synced 2026-04-07 18:35:22 -04:00
POSIX is pretty clear that command -v, command -V and type shall write absolute pathnames. Therefore, we need to prepend the current directory's name to relative pathnames. This can happen either when PATH contains a relative pathname or when the operand contains a slash but is not an absolute pathname.
9 lines
132 B
Text
9 lines
132 B
Text
# $FreeBSD$
|
|
|
|
r=`cd /bin && PATH=. command -V ls`
|
|
case $r in
|
|
*/bin/ls*|*/bin/./ls*) ;;
|
|
*)
|
|
echo "Unexpected result: $r"
|
|
exit 1
|
|
esac
|