#!/bin/sh ZROOT="breiz/BCK" ZFS="/sbin/zfs " for i in `${ZFS} list -H -o name -r ${ZROOT}` ; do status=`${ZFS} get -H canmount ${i}| cut -f3` [ "$status" != "off" ] && echo "$i is ${status}" && ${ZFS} set canmount=off $i done