freebsd-version(1): Disable pathname expansion in -j option

Set the -f flag to sh(1) to disable pathname expansion.
Also, quote the jail variable to ensure correct behavior when passed
to jexec(8).

Signed-off-by:	Nami Arjmandi <[email protected]>
Reviewed by:	pouria
Pull-Request:	https://github.com/freebsd/freebsd-src/pull/2158
This commit is contained in:
Nami Arjmandi authored and Pouria Mousavizadeh Tehrani committed 2026-04-22 23:25:19 +03:30
1 parent 81f60a964a
commit f3bd86ba18
1 file changed
+2 -2
+2 -2
View File
@@ -26,7 +26,7 @@
#
#
set -e
set -ef
USERLAND_VERSION="@@REVISION@@-@@BRANCH@@"
@@ -88,7 +88,7 @@ userland_version() {
#
jail_version() {
for i in $jail; do
jexec -- $i freebsd-version
jexec -- "$i" freebsd-version
done
}