From: Kairui Song Date: Wed, 27 May 2020 14:07:37 +0000 (+0800) Subject: 99memstrack: hook script should not call exit X-Git-Tag: 051~165 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=424f01e2a0ac0b329e68eb63048cf0d6d9c74d37;p=thirdparty%2Fdracut.git 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 who helped discover and debug this issue. Signed-off-by: Kairui Song --- diff --git a/modules.d/99memstrack/memstrack-report.sh b/modules.d/99memstrack/memstrack-report.sh index 241e86217..3de55bd10 100755 --- a/modules.d/99memstrack/memstrack-report.sh +++ b/modules.d/99memstrack/memstrack-report.sh @@ -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