Blame 0010-systemd-dracut-initqueue.sh-continue-to-boot-if-fini.patch

Harald Hoyer f8c4a0
From 226e3710b4236c69a8f821b6a5c53a264fe4892a Mon Sep 17 00:00:00 2001
Harald Hoyer f8c4a0
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer f8c4a0
Date: Mon, 5 Aug 2013 11:23:16 +0200
Harald Hoyer f8c4a0
Subject: [PATCH] systemd/dracut-initqueue.sh: continue to boot if finished
Harald Hoyer f8c4a0
 failed
Harald Hoyer f8c4a0
Harald Hoyer f8c4a0
but /sysroot/etc/fstab exists.
Harald Hoyer f8c4a0
---
Harald Hoyer f8c4a0
 modules.d/98systemd/dracut-initqueue.sh | 9 ++++++++-
Harald Hoyer f8c4a0
 1 file changed, 8 insertions(+), 1 deletion(-)
Harald Hoyer f8c4a0
Harald Hoyer f8c4a0
diff --git a/modules.d/98systemd/dracut-initqueue.sh b/modules.d/98systemd/dracut-initqueue.sh
Harald Hoyer f8c4a0
index 35cd76f..893ebc4 100755
Harald Hoyer f8c4a0
--- a/modules.d/98systemd/dracut-initqueue.sh
Harald Hoyer f8c4a0
+++ b/modules.d/98systemd/dracut-initqueue.sh
Harald Hoyer f8c4a0
@@ -62,7 +62,14 @@ while :; do
Harald Hoyer f8c4a0
     fi
Harald Hoyer f8c4a0
 
Harald Hoyer f8c4a0
     main_loop=$(($main_loop+1))
Harald Hoyer f8c4a0
-    [ $main_loop -gt $RDRETRY ] && action_on_fail "Could not boot." && break
Harald Hoyer f8c4a0
+    if [ $main_loop -gt $RDRETRY ];
Harald Hoyer f8c4a0
+        if ! [ -d /sysroot/etc/fstab ] || ! [ -e /sysroot/sbin/init ] ; then
Harald Hoyer f8c4a0
+            action_on_fail "Could not boot." && break
Harald Hoyer f8c4a0
+        fi
Harald Hoyer f8c4a0
+        warn "Not all disks have been found."
Harald Hoyer f8c4a0
+        warn "You might want to regenerate your initramfs."
Harald Hoyer f8c4a0
+        break
Harald Hoyer f8c4a0
+    fi
Harald Hoyer f8c4a0
 done
Harald Hoyer f8c4a0
 
Harald Hoyer f8c4a0
 unset job