dracut-044-6.git20151201

- fix for readonly /run on shutdown
- fix for the dmsquash-live module
This commit is contained in:
Harald Hoyer 2015-12-01 08:56:38 +01:00
parent e6ca8724c1
commit 4226e2b12c
3 changed files with 77 additions and 1 deletions

View File

@ -0,0 +1,39 @@
From 54e09dfb72b557ac8ccd48f5d37089287d272ec7 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 30 Nov 2015 11:27:03 +0100
Subject: [PATCH] shutdown: guard against read-only /run
remount the switch rooted /run writeable again.
---
modules.d/99shutdown/module-setup.sh | 2 +-
modules.d/99shutdown/shutdown.sh | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/modules.d/99shutdown/module-setup.sh b/modules.d/99shutdown/module-setup.sh
index b80a82c..5cb3594 100755
--- a/modules.d/99shutdown/module-setup.sh
+++ b/modules.d/99shutdown/module-setup.sh
@@ -14,7 +14,7 @@ depends() {
# called by dracut
install() {
local _d
- inst_multiple umount poweroff reboot halt losetup
+ inst_multiple umount poweroff reboot halt losetup stat
inst_multiple -o kexec
inst "$moddir/shutdown.sh" "$prefix/shutdown"
[ -e "${initdir}/lib" ] || mkdir -m 0755 -p ${initdir}/lib
diff --git a/modules.d/99shutdown/shutdown.sh b/modules.d/99shutdown/shutdown.sh
index afee051..918a8a4 100755
--- a/modules.d/99shutdown/shutdown.sh
+++ b/modules.d/99shutdown/shutdown.sh
@@ -12,6 +12,10 @@ export TERM=linux
export PATH=/usr/sbin:/usr/bin:/sbin:/bin
. /lib/dracut-lib.sh
+if [ "$(stat -c '%T' -f /)" = "tmpfs" ]; then
+ mount -o remount,rw /
+fi
+
mkdir /oldsys
for i in sys proc run dev; do
mkdir /oldsys/$i

View File

@ -0,0 +1,30 @@
From ce9a398771d6e8503d767b450282db52b7a4b482 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 1 Dec 2015 08:52:00 +0100
Subject: [PATCH] dmsquash-live/dmsquash-live-root.sh: SQUASHED can be set
earlier
8b5ee88ff667693b2d8da85a8552ad8f5ab95127 removed the check for SQUASHED,
assuming, that the if clause above was the only place, where SQUASHED is
set.
This patch reverts to the old logic, because SQUASHED can be set
earlier.
---
modules.d/90dmsquash-live/dmsquash-live-root.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh
index fa44a03..68d076c 100755
--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh
+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh
@@ -203,6 +203,9 @@ fi
# we might have an embedded fs image on squashfs (compressed live)
if [ -e /run/initramfs/live/${live_dir}/${squash_image} ]; then
SQUASHED="/run/initramfs/live/${live_dir}/${squash_image}"
+fi
+
+if [ -e "$SQUASHED" ] ; then
if [ -n "$live_ram" ]; then
echo "Copying live image to RAM..."
echo "(this may take a few minutes)"

View File

@ -16,7 +16,7 @@
Name: dracut
Version: 044
Release: 4.git20151127%{?dist}
Release: 6.git20151201%{?dist}
Summary: Initramfs generator using udev
%if 0%{?fedora} || 0%{?rhel}
@ -38,6 +38,8 @@ Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar
Patch1: 0001-dmsquash-live-dmsquash-live-root.sh-fixed-typo.patch
Patch2: 0002-dmraid-61-dmraid-imsm.rules-add-nowatch-option-for-u.patch
Patch3: 0003-livenet-livenet-generator.sh-mode-0755.patch
Patch4: 0004-shutdown-guard-against-read-only-run.patch
Patch5: 0005-dmsquash-live-dmsquash-live-root.sh-SQUASHED-can-be-.patch
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
@ -498,6 +500,11 @@ rm -rf -- $RPM_BUILD_ROOT
%endif
%changelog
* Tue Dec 1 2015 Harald Hoyer <harald@redhat.com> - 044-6.git20151201
- fix for readonly /run on shutdown
- fix for the dmsquash-live module
Resolves: rhbz#1286866
* Wed Nov 25 2015 Harald Hoyer <harald@redhat.com> - 044-4.git20151127
- fixes for the dmsquash-live module
- remove udev watch for raid members