Browse Source

99memstrack: hook script should not call exit

With memstrack module, rd.break may not work because the hook scripts
are sourced, not executed, so the exit call will make pre-pivot queue
exit early. See 98dracut-systemd/dracut-pre-pivot.sh, everything after
"source_hook cleanup" will be ignored.

Replace with return instead.

Credits go to Lukas Nykryn <lnykryn@redhat.com> who helped discover and
debug this issue.

Signed-off-by: Kairui Song <kasong@redhat.com>
master
Kairui Song 5 years ago committed by Lukáš Nykrýn
parent
commit
424f01e2a0
  1. 2
      modules.d/99memstrack/memstrack-report.sh

2
modules.d/99memstrack/memstrack-report.sh

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
. /lib/dracut-lib.sh

if ! [ "$DEBUG_MEM_LEVEL" -ge 4 ]; then
exit 0
return 0
fi

if type -P systemctl >/dev/null; then

Loading…
Cancel
Save