comparison sbin/fzfs @ 545:566ecdd9e73b

When analyzing the output of "mount -p" check for proper parsing capability: no improper mixing of tabs and spaces. Suggest (and mostly use) "jq" in other cases.
author Franz Glasner <fzglas.hg@dom66.de>
date Tue, 10 Sep 2024 10:13:59 +0200
parents f6dc405ddd58
children d28733400b18
comparison
equal deleted inserted replaced
544:56317c9226ba 545:566ecdd9e73b
320 echo "Umounting ${_name} on ${_mp}" 320 echo "Umounting ${_name} on ${_mp}"
321 /sbin/umount "${_mp}" || return 1 321 /sbin/umount "${_mp}" || return 1
322 fi 322 fi
323 done 323 done
324 else 324 else
325 # Check for unexpected spaces
326 if ! check_for_proper_fstab; then
327 fatal 1 "Unexpected spaces in fstab. Please install \`${JQ}'."
328 fi
325 /sbin/mount -t zfs -p \ 329 /sbin/mount -t zfs -p \
326 | LC_ALL=C /usr/bin/grep -E "^${_dsname}(/|\s)" \ 330 | LC_ALL=C /usr/bin/grep -E "^${_dsname}(/|\s)" \
327 | LC_ALL=C /usr/bin/sort -n -r \ 331 | LC_ALL=C /usr/bin/sort -n -r \
328 | while IFS=' '$'\t' read -r _name _mp _rest ; do 332 | while IFS=' '$'\t' read -r _name _mp _rest ; do
329 if checkyes _opt_dry_run ; then 333 if checkyes _opt_dry_run ; then