#!/bin/sh #- # Parallel mounting of ZFS filesystems leads to partial ordering of the # mounted filesystems. # Separating the header from the remaining lines and sorting the latter # before recombining is a viable solution. #- # https://lists.freebsd.org/pipermail/freebsd-current/2019-March/073016.html # https://lists.freebsd.org/pipermail/freebsd-current/2019-March/073022.html /bin/df ${@} | /usr/bin/awk '/^Filesystem/ { print; sort = "/usr/bin/sort -sk " NF-1 } ! /^Filesystem/ { print | sort }' # new-df.sh