Check for "udevadm settle" vs "udevsettle"
[zfs.git] / etc / init.d / zfs.redhat
index 99ff80e..d3475f0 100644 (file)
@@ -76,6 +76,13 @@ start()
                 action $"SELinux ZFS policy required: " /bin/false || return 6
         fi
 
+       # Delay until all required block devices are present.
+       if [ -x /sbin/udevadm ]; then
+               /sbin/udevadm settle
+       elif [ -x /sbin/udevsettle ]; then
+               /sbin/udevsettle
+       fi
+
        # load kernel module infrastructure
        if ! grep -q zfs /proc/modules ; then
                action $"Loading kernel ZFS infrastructure: " modprobe zfs || return 5
@@ -84,6 +91,8 @@ start()
 
        action $"Mounting automounted ZFS filesystems: " $ZFS mount -a || return 152
 
+       action $"Exporting ZFS filesystems: " $ZFS share -a || return 153
+
        # Read fstab, try to mount zvols ignoring error
        read_fstab "^/dev/(zd|zvol)"
        template=$"Mounting volume %s registered in fstab: "