1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
  
     | 
    
      From: Benjamin Drung <benjamin.drung@canonical.com>
Date: Mon, 11 Aug 2025 14:01:23 +0200
Subject: fix(lsinitrd): avoid rechecking for squash images
The function `extract_squash_img` uses `SQUASH_TMPDIR` to check that it
was already called but did not find any squash image.
Instead of setting `SQUASH_TMPDIR` `SQUASH_TMPFILE` was set and
therefore the cpio file is searched again on every `extract_squash_img`
call.
Forwarded: https://github.com/dracut-ng/dracut-ng/pull/1557
---
 lsinitrd.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lsinitrd.sh b/lsinitrd.sh
index 00cfeca..2de972a 100755
--- a/lsinitrd.sh
+++ b/lsinitrd.sh
@@ -218,7 +218,7 @@ extract_squash_img() {
     done
 
     if [[ -z $SQUASH_TMPFILE ]]; then
-        SQUASH_TMPFILE=none
+        SQUASH_TMPDIR=none
         return 1
     fi
 
 
     |