]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
99squash: Don't hardcode the squash sub directories
authorKairui Song <kasong@redhat.com>
Mon, 8 Jun 2020 07:31:56 +0000 (15:31 +0800)
committerDaniel Molkentin <daniel@molkentin.de>
Tue, 4 Aug 2020 12:24:53 +0000 (14:24 +0200)
Signed-off-by: Kairui Song <kasong@redhat.com>
modules.d/99squash/setup-squash.sh

index d2740e7cd7a2c8f4ce3c731e14e7c033a972e94e..d0000b6f776d610f3759068dfbc04895290f161d 100755 (executable)
@@ -4,7 +4,6 @@ PATH=/bin:/sbin
 SQUASH_IMG=/squash/root.img
 SQUASH_MNT=/squash/root
 SQUASH_MNT_REC=/squash/mounts
-SQUASHED_MNT="usr etc"
 
 echo $SQUASH_MNT > $SQUASH_MNT_REC
 
@@ -45,7 +44,8 @@ if [ $? != 0 ]; then
     echo "Unable to mount squashed initramfs image"
 fi
 
-for file in $SQUASHED_MNT; do
+for file in $SQUASH_MNT/*; do
+       file=${file#$SQUASH_MNT/}
        lowerdir=$SQUASH_MNT/$file
        workdir=/squash/overlay-work/$file
        upperdir=/$file