X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=etc%2Finit.d%2Fzfs.lunar;h=c77b2b7808967f43f008488fb7d434c67d73f319;hb=52e7c3a2e503f78a44fbe5fd9299b11c3aa98651;hp=c7aa1edb46e3fa2115f0aa3e0dc60e0dfe3ce731;hpb=712f8bd87b2d3799107e102652875996fa59647b;p=zfs.git diff --git a/etc/init.d/zfs.lunar b/etc/init.d/zfs.lunar index c7aa1ed..c77b2b7 100644 --- a/etc/init.d/zfs.lunar +++ b/etc/init.d/zfs.lunar @@ -13,6 +13,9 @@ case $1 in start) echo "$1ing ZFS filesystems" + # Delay until all required block devices are present. + udevadm settle + if ! grep "zfs" /proc/modules > /dev/null; then echo "ZFS kernel module not loaded yet; loading..."; if ! modprobe zfs; then @@ -28,16 +31,16 @@ case $1 in # do, thus i'm not breaking here. fi - # mount the filesystems - while IFS= read -r -d $'\n' dev; do - mdev=$(echo "$dev" | awk '{ print $1; }') - echo -n "mounting $mdev..." - if `zfs mount $mdev`; then - echo -e "done"; - else - echo -e "failed"; - fi - done < <(zfs list -H); + # mount the filesystems + while IFS= read -r -d $'\n' dev; do + mdev=$(echo "$dev" | awk '{ print $1; }') + echo -n "mounting $mdev..." + if zfs mount $mdev; then + echo -e "done"; + else + echo -e "failed"; + fi + done < <(zfs list -H); ;; @@ -49,7 +52,7 @@ case $1 in while IFS= read -r -d $'\n' dev; do mdev=$(echo "$dev" | awk '{ print $1 }'); echo -n "umounting $mdev..."; - if `zfs umount $mdev`; then + if zfs umount $mdev; then echo -e "done"; else echo -e "failed";