9f65cc
From 776ee36e59f6f2cb97f6cd2bca4c989b89a727d2 Mon Sep 17 00:00:00 2001
9f65cc
From: Kairui Song <kasong@redhat.com>
9f65cc
Date: Mon, 8 Jun 2020 15:31:56 +0800
9f65cc
Subject: [PATCH] 99squash: Don't hardcode the squash sub directories
9f65cc
9f65cc
Signed-off-by: Kairui Song <kasong@redhat.com>
9f65cc
(cherry picked from commit 3a2beb037c822e1567f86b63ac24194bffeea991)
9f65cc
9f65cc
Resolves: #1959336
9f65cc
---
9f65cc
 modules.d/99squash/setup-squash.sh | 4 ++--
9f65cc
 1 file changed, 2 insertions(+), 2 deletions(-)
9f65cc
9f65cc
diff --git a/modules.d/99squash/setup-squash.sh b/modules.d/99squash/setup-squash.sh
9f65cc
index d2740e7c..d0000b6f 100755
9f65cc
--- a/modules.d/99squash/setup-squash.sh
9f65cc
+++ b/modules.d/99squash/setup-squash.sh
9f65cc
@@ -4,7 +4,6 @@ PATH=/bin:/sbin
9f65cc
 SQUASH_IMG=/squash/root.img
9f65cc
 SQUASH_MNT=/squash/root
9f65cc
 SQUASH_MNT_REC=/squash/mounts
9f65cc
-SQUASHED_MNT="usr etc"
9f65cc
 
9f65cc
 echo $SQUASH_MNT > $SQUASH_MNT_REC
9f65cc
 
9f65cc
@@ -45,7 +44,8 @@ if [ $? != 0 ]; then
9f65cc
     echo "Unable to mount squashed initramfs image"
9f65cc
 fi
9f65cc
 
9f65cc
-for file in $SQUASHED_MNT; do
9f65cc
+for file in $SQUASH_MNT/*; do
9f65cc
+	file=${file#$SQUASH_MNT/}
9f65cc
 	lowerdir=$SQUASH_MNT/$file
9f65cc
 	workdir=/squash/overlay-work/$file
9f65cc
 	upperdir=/$file
9f65cc