Accepting request 262695 from home:arvidjaar:bnc:906592

- add 0165-Order-root-fsck-after-pre-mount.patch
  ensure root fsck runs after dracut-pre-mount.service which calls
  resume (bnc#906592)

OBS-URL: https://build.opensuse.org/request/show/262695
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=198
This commit is contained in:
Stefan Seyfried 2014-11-25 07:54:10 +00:00 committed by Git OBS Bridge
parent 125c8353e6
commit dd6b2617b4
3 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,39 @@
From: Andrei Borzenkov <arvidjaar@gmail.com>
Subject: ensure pre-mount (and resume) run before root fsck
References: bnc#906592
Index: dracut-037/modules.d/98systemd/rootfs-generator.sh
===================================================================
--- dracut-037.orig/modules.d/98systemd/rootfs-generator.sh
+++ dracut-037/modules.d/98systemd/rootfs-generator.sh
@@ -66,6 +66,23 @@ generator_mount_rootfs()
fi
}
+generator_fsck_after_pre_mount()
+{
+ local _name
+
+ [ -z "$1" ] && return 0
+
+ _name=$(dev_unit_name "$1")
+ [ -d /run/systemd/generator/systemd-fsck@${_name}.service.d ] || mkdir -p /run/systemd/generator/systemd-fsck@${_name}.service.d
+ if ! [ -f /run/systemd/generator/systemd-fsck@${_name}.service.d/after-pre-mount.conf ]; then
+ {
+ echo "[Unit]"
+ echo "After=dracut-pre-mount.service"
+ } > /run/systemd/generator/systemd-fsck@${_name}.service.d/after-pre-mount.conf
+ fi
+
+}
+
root=$(getarg root=)
case "$root" in
block:LABEL=*|LABEL=*)
@@ -94,6 +111,7 @@ esac
if [ "${root%%:*}" = "block" ]; then
generator_wait_for_dev "${root#block:}" "$RDRETRY"
+ generator_fsck_after_pre_mount "${root#block:}"
grep -q 'root=' /proc/cmdline || generator_mount_rootfs "${root#block:}" "$(getarg rootfstype=)" "$(getarg rootflags=)"
fi

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sat Nov 22 06:26:37 UTC 2014 - arvidjaar@gmail.com
- add 0165-Order-root-fsck-after-pre-mount.patch
ensure root fsck runs after dracut-pre-mount.service which calls
resume (bnc#906592)
-------------------------------------------------------------------
Wed Oct 15 16:07:47 UTC 2014 - trenn@suse.de

View File

@ -185,6 +185,7 @@ Patch161: 0161-Fix-error-message-when-there-are-no-internal-kernel-.patch
Patch162: 0162-network-Request-DHCP-lease-instead-of-getting-applyi.patch
Patch163: 0163-Install-etc-sysconfig-console-to-see-specific-fonts.patch
Patch164: 0164-Fix-initramfs-ver.img-vs-initrd-ver-in-dracut-initra.patch
Patch165: 0165-Order-root-fsck-after-pre-mount.patch
BuildRequires: asciidoc
BuildRequires: bash
@ -392,6 +393,7 @@ and its cryptography during startup.
%patch162 -p1
%patch163 -p1
%patch164 -p1
%patch165 -p1
%build
%configure\