dracut/0005-dmsquash-live-dmsquash...

31 lines
1.2 KiB
Diff

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)"