diff --git a/cdist/conf/type/__git/explorer/group b/cdist/conf/type/__git/explorer/group old mode 100644 new mode 100755 index 3ddf9656..938f61d3 --- a/cdist/conf/type/__git/explorer/group +++ b/cdist/conf/type/__git/explorer/group @@ -2,4 +2,14 @@ destination="/$__object_id/.git" -stat --print "%G" "${destination}" 2>/dev/null || exit 0 +os="$(cat "$__global/explorer/os")" + +case $os in + *bsd) + # Checked on OpenBSD, FreeBSD and NetBSD + stat -f "%Sg" "${destination}" 2>/dev/null || exit 0 + ;; + *) + stat --print "%G" "${destination}" 2>/dev/null || exit 0 + ;; +esac diff --git a/cdist/conf/type/__git/explorer/owner b/cdist/conf/type/__git/explorer/owner old mode 100644 new mode 100755 index 4c3cd431..0442b11a --- a/cdist/conf/type/__git/explorer/owner +++ b/cdist/conf/type/__git/explorer/owner @@ -2,4 +2,14 @@ destination="/$__object_id/.git" -stat --print "%U" "${destination}" 2>/dev/null || exit 0 +os="$(cat "$__global/explorer/os")" + +case $os in + *bsd) + # Checked on OpenBSD, FreeBSD and NetBSD + stat -f "%Su" "${destination}" 2>/dev/null || exit 0 + ;; + *) + stat --print "%U" "${destination}" 2>/dev/null || exit 0 + ;; +esac