diff --git a/modules.d/99memstrack/memstrack-report.sh b/modules.d/99memstrack/memstrack-report.sh index 69c9638efc..0ee7f2f795 100755 --- a/modules.d/99memstrack/memstrack-report.sh +++ b/modules.d/99memstrack/memstrack-report.sh @@ -1,15 +1,15 @@ -#!/bin/bash +#!/bin/sh . /lib/dracut-lib.sh if ! [ "$DEBUG_MEM_LEVEL" -ge 4 ]; then return 0 fi -if type -P systemctl > /dev/null; then +if command -v systemctl > /dev/null; then systemctl stop memstrack.service else pkill --signal INT '[m]emstrack' - while [[ $(pgrep '[m]emstrack') ]]; do + while pgrep -c '[m]emstrack' > /dev/null; do sleep 1 done fi diff --git a/modules.d/99memstrack/module-setup.sh b/modules.d/99memstrack/module-setup.sh index 91309bb5e6..0eb641c35a 100755 --- a/modules.d/99memstrack/module-setup.sh +++ b/modules.d/99memstrack/module-setup.sh @@ -11,6 +11,7 @@ check() { } depends() { + echo systemd return 0 }