Skip to content

Commit

Permalink
fix(memstrack): correct dependencies
Browse files Browse the repository at this point in the history
memstrack does not need to depend on `bash` but does on `systemd`.
  • Loading branch information
haraldh committed Mar 30, 2021
1 parent e6e78b1 commit c2ecc4d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions 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
Expand Down
1 change: 1 addition & 0 deletions modules.d/99memstrack/module-setup.sh
Expand Up @@ -11,6 +11,7 @@ check() {
}

depends() {
echo systemd
return 0
}

Expand Down

0 comments on commit c2ecc4d

Please sign in to comment.