Skip to content

Commit

Permalink
updated module
Browse files Browse the repository at this point in the history
Signed-off-by: Itxaka <[email protected]>
  • Loading branch information
Itxaka committed Oct 10, 2023
1 parent 08d3258 commit a2c5594
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions 90kairos-sysext/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,23 @@

# called by dracut
check() {
# Return 255 to only include the module, if another module requires it.
return 255
return 0
}

# called by dracut
depends() {
# If the binary(s) requirements are not fulfilled the module can't be installed.
require_binaries systemd-sysext || return 1
echo "systemd-sysext"
return 0
# Check if the module files exists
# This is not normal but on ubuntu-22 the binary for sysext exists but the dracut module doesnt, so we
# need to do further checks
files=( "${dracutbasedir}"/modules.d/??systemd-sysext )
[ "${#files[@]}" -ge 2 ] && return 1
if [ -d "${files[0]}" ]; then
echo "systemd-sysext"
return 0
fi
return 1
}

# called by dracut
Expand Down

0 comments on commit a2c5594

Please sign in to comment.