# HG changeset patch # User Franz Glasner # Date 1661070434 -7200 # Node ID a4fd3bcbbf1c58dccdbdeec9e03cf5da552d9c35 # Parent 4a0cb73945a81d3d4bceb0ec7204dc924edbebb6 Use "mount -p" instead of "zfs mount" when determining devices for the real mountpoints diff -r 4a0cb73945a8 -r a4fd3bcbbf1c sbin/fjail --- a/sbin/fjail Sun Aug 21 08:50:20 2022 +0200 +++ b/sbin/fjail Sun Aug 21 10:27:14 2022 +0200 @@ -83,21 +83,21 @@ _get_dataset_for_mountpoint() { - : 'Use `zfs mount` to determine the ZFS dataset for a given mountpoint. + : 'Use `mount -t zfs -p` to determine the ZFS dataset for a given mountpoint. ' local _mountpoint - local _ds _mount + local _ds _mount _rest _mountpoint="$1" - while read -r _ds _mount; do + while IFS=' '$'\t' read -r _ds _mount _rest ; do if [ "$_mount" = "$_mountpoint" ]; then - echo $_ds + echo "${_ds}" return 0 fi done </dev/null) || { echo "ERROR: cannot determine readonly status of ${_mp}/var/empty" >&2; return 1; } IFS=$'\t' read _dummy _dummy _vestatus _dummy <