action $"SELinux ZFS policy required: " /bin/false || return 6
fi
+ # Delay until all required block devices are present.
+ udevadm settle
+
# load kernel module infrastructure
if ! grep -q zfs /proc/modules ; then
action $"Loading kernel ZFS infrastructure: " modprobe zfs || return 5
action $"Mounting ZFS filesystems not yet mounted: " $ZFS mount -a || return 152
- # hack to read mounted file systems because otherwise
- # zfs returns EPERM when a non-root user reads a mounted filesystem before root did
- savepwd="$PWD"
- mount | grep " type zfs " | sed 's/.*on //' | sed 's/ type zfs.*$//' | while read line ; do
- cd "$line" > /dev/null 2>&1
- ls > /dev/null
- done
- cd "$savepwd"
+ action $"Exporting ZFS filesystems: " $ZFS share -a || return 153
read_mtab "^/dev/zd"
read_fstab "^/dev/zd"