]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(base): suppress calls to getarg in build phase
authorHarald Hoyer <harald@redhat.com>
Thu, 6 May 2021 07:10:54 +0000 (09:10 +0200)
committerHarald Hoyer <harald@hoyer.xyz>
Thu, 6 May 2021 08:39:34 +0000 (10:39 +0200)
Setting `DEBUG_MEM_LEVEL` in the build phase prevents
`setmemdebug()` to call `getargnum`, which would use `dracut-getarg`
in the initrd runtime phase.

No more:

```
modules.d/99base/dracut-lib.sh: line 217: dracut-getarg: command not found
```

modules.d/99base/module-setup.sh

index 193d07a7110ee8a41b3c9f25412bec968642a7a9..a52c643e42caf2c25780a0562997bbe950e881a7 100755 (executable)
@@ -17,7 +17,7 @@ install() {
         sed ls flock cp mv dmesg rm ln rmmod mkfifo umount readlink setsid \
         modprobe chmod
 
-    inst_multiple -o findmnt less kmod dracut-getargs
+    inst_multiple -o findmnt less kmod
 
     inst_binary "${dracutsysrootdir}${dracutbasedir}/dracut-util" "/usr/bin/dracut-util"
 
@@ -117,6 +117,8 @@ install() {
                 fi
                 export PREFIX="$initdir"
 
+                # suppress getarg for `rd.memdebug`
+                export DEBUG_MEM_LEVEL=0
                 # shellcheck source=dracut-lib.sh
                 . "$moddir/dracut-lib.sh"