]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dmsquash-live/dmsquash-live-root.sh: SQUASHED can be set earlier
authorHarald Hoyer <harald@redhat.com>
Tue, 1 Dec 2015 07:52:00 +0000 (08:52 +0100)
committerHarald Hoyer <harald@redhat.com>
Tue, 1 Dec 2015 07:52:00 +0000 (08:52 +0100)
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

index fa44a03f86cf7250056dd5cf958a7c82b39b1bf4..68d076cb9432b341a9a55143766c98b36eda7d06 100755 (executable)
@@ -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)"