[type __jail] do better version selection on freebsd > 9

Contributed by Shannon Prickett
This commit is contained in:
Nico Schottelius 2026-06-05 12:47:03 +02:00
commit 3d2e3f4a2e

View file

@ -1,6 +1,8 @@
#!/bin/sh -e
#
# 2012 Jake Guffey (jake.guffey at eprotex.com)
# 2026 Shannon Prickett
# 2026 Nico Schottelius
#
# This file is part of cdist.
#
@ -43,7 +45,7 @@ for property in *; do
set -- "$@" "--$property" "$(cat "$property")"
done
if grep -q '^10\.' "$(cat "$__global/explorer/os_version")" ; then # Version is 10.x
if grep -q '^[[:digit:]]\{2,\}\.' "$__global/explorer/os_version" ; then # Version > 9.x
__jail_freebsd10 "$@"
else
__jail_freebsd9 "$@"
@ -51,4 +53,3 @@ fi
# Debug
#set +x