File: fix-lsinitrd-avoid-rechecking-for-squash-images.patch

package info (click to toggle)
dracut 108-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,420 kB
  • sloc: sh: 25,011; ansic: 5,202; makefile: 348; perl: 186; python: 28; javascript: 19
file content (29 lines) | stat: -rw-r--r-- 836 bytes parent folder | download
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