# HG changeset patch # User Franz Glasner # Date 1662886620 -7200 # Node ID 0b5dbf394aa2aa0754c3f07f93d25bd6ed3b9b40 # Parent 5dd38cb3fecfaa5fe91788bf8ea5b024204a7a4f FIX: echo 2>&1 is not intended: use 1>&2 instead diff -r 5dd38cb3fecf -r 0b5dbf394aa2 sbin/ftjail --- a/sbin/ftjail Sun Sep 11 10:18:15 2022 +0200 +++ b/sbin/ftjail Sun Sep 11 10:57:00 2022 +0200 @@ -81,7 +81,7 @@ while getopts ":" _opt ; do [ "${_opt}" = '?' ] && { echo "ERROR: no option allowed" 1>&2; exit 2; } - done + done } @@ -90,7 +90,7 @@ ' local _mountpoint - + local _ds _mount _rest _mountpoint="$1" @@ -130,7 +130,7 @@ esac done shift $((OPTIND-1)) - OPTIND=1 + OPTIND=1 _p_base="${1-}" _name="${2-}" @@ -187,7 +187,7 @@ esac done shift $((OPTIND-1)) - OPTIND=1 + OPTIND=1 _p_skel="${1-}" _name="${2-}" @@ -403,7 +403,7 @@ # if [ "${_mount_natural}" = "yes" ]; then if [ "${_real_mp}" != "${_mp}" ]; then - echo "ERROR: mountpoint mismatch" >&2 + echo "ERROR: mountpoint mismatch" 1>&2 return 1 fi fi @@ -418,7 +418,7 @@ fi ;; *) - echo "Skipping ${_name} because its configured ZFS mountpoint is not relative to given root dataset" 2>&1 + echo "Skipping ${_name} because its configured ZFS mountpoint is not relative to given root dataset" 1>&2 ;; esac done @@ -536,9 +536,9 @@ _mountpoint="${1-}" - [ -z "${_mountpoint}" ] && { echo "ERROR: no mountpoint given" 2>&1; return 2; } - [ -d "${_mountpoint}" ] || { echo "ERROR: mountpoint \`${_mountpoint}' does not exist" 2>&1; return 1; } - [ -d "${_mountpoint}/skeleton" ] || { echo "WARNING: skeleton is not mounted at \`${_mountpoint}/skeleton'" 2>&1; } + [ -z "${_mountpoint}" ] && { echo "ERROR: no mountpoint given" 1>&2; return 2; } + [ -d "${_mountpoint}" ] || { echo "ERROR: mountpoint \`${_mountpoint}' does not exist" 1>&2; return 1; } + [ -d "${_mountpoint}/skeleton" ] || { echo "WARNING: skeleton is not mounted at \`${_mountpoint}/skeleton'" 1>&2; } for _dir in etc home root tmp usr/local var ; do case "${_dir}" in