diff sbin/ftjail @ 444:84e43d1bd128

Move "_get_dataset_for_mountpoint()" and "_get_dataset_for_varempty()" into common.subr
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 06 May 2024 09:14:41 +0200
parents 071f24359eef
children f6f64fd6f17b
line wrap: on
line diff
--- a/sbin/ftjail	Fri May 03 09:41:38 2024 +0200
+++ b/sbin/ftjail	Mon May 06 09:14:41 2024 +0200
@@ -65,29 +65,6 @@
 umask 0022
 
 
-_get_dataset_for_mountpoint() {
-    : 'Use `mount -t zfs -p` to determine the ZFS dataset for a given mountpoint.
-
-    '
-    local _mountpoint
-
-    local _ds _mount _rest
-
-    _mountpoint="$1"
-
-    mount -t zfs -p \
-    | {
-        while IFS=' '$'\t' read -r _ds _mount _rest ; do
-            if [ "$_mount" = "$_mountpoint" ]; then
-                echo "${_ds}"
-                return 0
-            fi
-        done
-        return 1
-    }
-}
-
-
 #:
 #: Search for a running jail where it's "path" points to a given location
 #: