ab92d3
From faadc1cbcd1ca35393b75f93757a89621957453c Mon Sep 17 00:00:00 2001
ab92d3
From: Kairui Song <kasong@redhat.com>
ab92d3
Date: Tue, 22 Jun 2021 21:49:20 +0800
ab92d3
Subject: [PATCH] feat(squash): install umount util
ab92d3
ab92d3
Also install umount binary, make it possible to cleanup squash overlay
ab92d3
mounts. This is useful for other tools reusing the dracut initramfs built
ab92d3
with squash module enabled.
ab92d3
ab92d3
Signed-off-by: Kairui Song <kasong@redhat.com>
ab92d3
(cherry picked from commit 563f543424c66bf38e6cbd3f489655d45ad9b5c5)
ab92d3
ab92d3
Resolves: #1959336
ab92d3
---
ab92d3
 modules.d/99squash/module-setup.sh | 4 ++--
ab92d3
 1 file changed, 2 insertions(+), 2 deletions(-)
ab92d3
ab92d3
diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh
ab92d3
index 81a5b3f7..9bb30b2e 100644
ab92d3
--- a/modules.d/99squash/module-setup.sh
ab92d3
+++ b/modules.d/99squash/module-setup.sh
ab92d3
@@ -42,11 +42,11 @@ installpost() {
ab92d3
     # Install required modules and binaries for the squash image init script.
ab92d3
     if [[ $_busybox ]]; then
ab92d3
         inst "$_busybox" /usr/bin/busybox
ab92d3
-        for _i in sh echo mount modprobe mkdir switch_root grep; do
ab92d3
+        for _i in sh echo mount modprobe mkdir switch_root grep umount; do
ab92d3
             ln_r /usr/bin/busybox /usr/bin/$_i
ab92d3
         done
ab92d3
     else
ab92d3
-        DRACUT_RESOLVE_DEPS=1 inst_multiple sh mount modprobe mkdir switch_root grep
ab92d3
+        DRACUT_RESOLVE_DEPS=1 inst_multiple sh mount modprobe mkdir switch_root grep umount
ab92d3
     fi
ab92d3
 
ab92d3
     hostonly="" instmods "loop" "squashfs" "overlay"
ab92d3