changeset 200:8f739dd15d7f

FIX: Use "||" instead of "|" when handling an error case
author Franz Glasner <fzglas.hg@dom66.de>
date Sun, 21 Aug 2022 11:19:47 +0200
parents a8b6584d24ec
children 687210f46b8f
files sbin/fjail
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sbin/fjail	Sun Aug 21 11:06:19 2022 +0200
+++ b/sbin/fjail	Sun Aug 21 11:19:47 2022 +0200
@@ -451,7 +451,7 @@
         { echo "ERROR: no dataset given" >&2; return 2; }
 
     # Just determine whether the given dataset name exists
-    _rootds_mountpoint="$(zfs list -H -o mountpoint -t filesystem "${_dsname}")" | return 1
+    _rootds_mountpoint="$(zfs list -H -o mountpoint -t filesystem "${_dsname}")" || { echo "ERROR: dataset not found" >&2; return 1; }
 
     mount -t zfs -p | \
         grep -E "^${_dsname}(/|\s)" | \