dracut/0535-Sync-initramfs-after-creation.patch
Daniel Molkentin d2c0ca313f Accepting request 517604 from home:dmolkentin:branches:Base:System
- Ensure that targets such as halt can be reached (bsc#1048698)
 * adds 0529-systemd-add-missing-.slice-unit.patch
 * adds 0530-dracut-systemd-dracut-cmdline-ask-fix-dracut-kernel-.patch
 * adds 0531-dracut-systemd-.service-conflict-with-shutdown-targe.patch
- Do not add too many drivers all at once (bsc#1037344)
 * adds 0532-List-drivers-rather-than-looking-for-reverse-depende.patch
- instmods: check modules.builtin in $srcmods (bsc#1048606)
 * adds 0533-instmods-check-modules.builtin-in-srcmods.patch
- ssh-client: ensure is usable in all cases (bsc#1021846)
 * adds 0535-ssh-client-Include-nss_-libraries.patch
- Sync initramfs after creation to ensure entigrity (bsc#1049113)
 * adds 0536-Sync-initramfs-after-creation.patch

OBS-URL: https://build.opensuse.org/request/show/517604
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=316
2017-08-18 16:12:38 +00:00

33 lines
800 B
Diff

From 6b4f01ef7728cdb4ade4d6ef44313127d7d8f8f3 Mon Sep 17 00:00:00 2001
From: Ankit Kumar <ankit@linux.vnet.ibm.com>
Date: Mon, 7 Aug 2017 12:13:53 +0530
Subject: [PATCH] Sync initramfs after creation
If we trigger crash just after creating initramfs, sometimes it is
observed that initramfs is not written to disk causing the subsequent
boot to fail. A sync should resolve this.
Signed-off-by: Ankit Kumar <ankit@linux.vnet.ibm.com>
---
dracut.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dracut.sh b/dracut.sh
index 35d7e134..39bae4e7 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1832,4 +1832,10 @@ else
fi
+sync $outfile 2> /dev/null
+if [ $? -ne 0 ] ; then
+ dinfo "dracut: sync operartion on newly created initramfs $outfile failed"
+ exit 1
+fi
+
exit 0
--
2.12.3