Skip to content

Commit

Permalink
fix(base): suppress calls to getarg in build phase
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
haraldh committed May 6, 2021
1 parent c3bb9d1 commit 6feaaab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules.d/99base/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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"

Expand Down

0 comments on commit 6feaaab

Please sign in to comment.