diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index fd178b1..72b503d 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -13,7 +13,12 @@ check() { } depends() { - echo "base shutdown" + local _dep="base shutdown" + + if sestatus 2>/dev/null | grep -q "SELinux status.*enabled"; then + _dep="$_dep selinux" + fi + echo $_dep return 0 }