]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
perf(dracut): unset threecpio_help_output after usage
authorBenjamin Drung <benjamin.drung@canonical.com>
Sat, 24 Jan 2026 15:41:32 +0000 (16:41 +0100)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Sun, 25 Jan 2026 13:54:42 +0000 (08:54 -0500)
Reduce the memory consumption by unsetting `threecpio_help_output` after
usage.

dracut.sh
lsinitrd.sh

index 45f21d1a42fa92925a755e3d4382ec49b0bc5108..0cc007a4a06409a74fb4e1f133fccce9cd6a1ad3 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -2107,6 +2107,7 @@ if [[ $enhanced_cpio == "yes" ]]; then
 else
     unset enhanced_cpio
 fi
+unset threecpio_help_output
 
 if [[ $no_kernel != yes ]] && ! [[ -d $srcmods ]]; then
     dfatal "Cannot find module directory $srcmods"
index 63cf7b58987743f83352137874aaab9915a501a3..66c9a8ba5f9bd8d0c3d83966605808e3889c85a4 100755 (executable)
@@ -108,6 +108,7 @@ if command -v 3cpio > /dev/null; then
         echo "Warning: Calling '3cpio --help' failed. Cannot check if 3cpio supports --make-directories."
         CPIO=3cpio
     fi
+    unset threecpio_help_output
 fi
 
 if ! [[ $KERNEL_VERSION ]]; then