btrfs/btrfs_finished.sh: use btrfs device ready for probing
authorHarald Hoyer <harald@redhat.com>
Fri, 8 Feb 2013 13:14:10 +0000 (14:14 +0100)
committerHarald Hoyer <harald@redhat.com>
Fri, 8 Feb 2013 15:52:38 +0000 (16:52 +0100)
modules.d/90btrfs/btrfs_finished.sh

index 5e7691a..19715f6 100755 (executable)
@@ -11,6 +11,7 @@ btrfs_check_complete() {
     _rootinfo=$(udevadm info --query=env "--name=$_dev" 2>/dev/null)
     if strstr "$_rootinfo" "ID_FS_TYPE=btrfs"; then
         info "Checking, if btrfs device complete"
+        btrfs device ready "$_dev" >/dev/null 2>&1 && return 0
         unset __btrfs_mount
         mount -o ro "$_dev" /tmp >/dev/null 2>&1
         __btrfs_mount=$?