From: Alexander Barton Date: Mon, 24 Aug 2015 08:24:41 +0000 (+0200) Subject: Filesystem summary: Use "zfs list" on ZFS filesystems X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=backup-script.git;a=commitdiff_plain;h=c0e1055b5e32b4a9b112cc5c07cf917989bae732 Filesystem summary: Use "zfs list" on ZFS filesystems --- diff --git a/bin/backup-script b/bin/backup-script index d28a4d8..cf61a72 100755 --- a/bin/backup-script +++ b/bin/backup-script @@ -619,10 +619,27 @@ done sync -paths=$( echo $destinations | sed -e 's/ /\n/g' | sort | uniq ) -if [ "$DRYRUN" -eq 0 -a -n "$paths" ]; then - df -h $paths - echo +if [ "$DRYRUN" -eq 0 ]; then + paths="" + paths_zfs="" + for dest in $(echo $destinations | sed -e 's/ /\n/g' | sort | uniq); do + fs=$(GetFS "$dest") + case $fs in + "zfs" ) + paths_zfs="$paths_zfs $dest" + ;; + *) + paths="$paths $dest" + esac + done + if [ -n "$paths" ]; then + df -h $paths + echo + fi + if [ -n "$paths_zfs" ]; then + zfs list $paths_zfs + echo + fi fi CleanUp