# HG changeset patch # User Franz Glasner # Date 1727528157 -7200 # Node ID db22766df6a473acf6c0066563899dc4ac65bdde # Parent a8052a57a921125eddc6bf9c19c3f872097f67a2 ftjail: redirect stderr when determining the existence of a ZFS dataset snapshot diff -r a8052a57a921 -r db22766df6a4 sbin/ftjail --- a/sbin/ftjail Sat Sep 28 14:53:14 2024 +0200 +++ b/sbin/ftjail Sat Sep 28 14:55:57 2024 +0200 @@ -903,7 +903,7 @@ [ -d "${_directory}" ] || { echo "ERROR: directory \`${_directory}' does not exist" 1>&2; return 1; } [ -z "${_new_origin}" ] && { echo "ERROR: no new origin given" 1>&2; return 2; } - zfs list -H -o name -t snapshot "${_new_origin}" >/dev/null || { echo "ERROR: ZFS dataset for the new origin \`${_new_origin}' does not exist" 1>&2; return 1; } + zfs list -H -o name -t snapshot "${_new_origin}" >/dev/null 2>/dev/null || { echo "ERROR: ZFS dataset snapshot for the new origin \`${_new_origin}' does not exist" 1>&2; return 1; } if [ -n "${_etcupdate_tarball}" ]; then [ -r "${_etcupdate_tarball}" ] || { echo "ERROR: given etcupdate tarball does not exist and/or is not readable" 1>&2; return 1; } fi