Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
changeset 195:4a0cb73945a8
Use "read -r" for when mounting/unmounting
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sun, 21 Aug 2022 08:50:20 +0200 |
| parents | 379d3178f3ce |
| children | a4fd3bcbbf1c |
| files | sbin/fjail |
| diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/sbin/fjail Sun Aug 21 08:35:18 2022 +0200 +++ b/sbin/fjail Sun Aug 21 08:50:20 2022 +0200 @@ -395,7 +395,7 @@ { echo "ERROR: root dataset does not exist" >&2; return 1; } zfs list -H -o name,mountpoint,canmount,mounted -s mountpoint -t filesystem -r "${_dsname}" | \ - while IFS=$'\t' read _name _mp _canmount _mounted ; do + while IFS=$'\t' read -r _name _mp _canmount _mounted ; do # Skip filesystems that are already mounted [ "${_mounted}" = "yes" ] && continue # Skip filesystems that must not be mounted @@ -455,7 +455,7 @@ mount -t zfs -p | \ grep -E "^${_dsname}(/|\s)" | \ sort -n -r | \ - while IFS=' '$'\t' read _name _mp _rest ; do + while IFS=' '$'\t' read -r _name _mp _rest ; do echo "Umounting ${_name} on ${_mp}" umount "${_mp}" || return 1 done
