require_binaries coredumpctl || return 1
require_binaries $systemdutildir/systemd-coredump || return 1
- # If the module dependency requirements are not fulfilled
- # return 1 to not include the required module(s).
- if ! dracut_module_included "systemd"; then
- derror "systemd-coredump needs systemd in the initramfs."
- return 1
- fi
-
- if ! dracut_module_included "systemd-journald"; then
- derror "systemd-coredump needs systemd-journald in the initramfs."
- return 1
- fi
-
- if ! dracut_module_included "systemd-sysctl"; then
- derror "systemd-coredump needs systemd-sysctl in the initramfs."
- return 1
- fi
-
# Return 255 to only include the module, if another module requires it.
return 255
check() {
[[ $mount_needs ]] && return 1
- if ! dracut_module_included "systemd"; then
- derror "systemd-initrd needs systemd in the initramfs"
- return 1
- fi
-
return 0
}
# return 1 to not include the binary.
require_binaries systemd-repart || return 1
- # If the module dependency requirements are not fulfilled
- # return 1 to not include the required module(s).
- if ! dracut_module_included "systemd"; then
- derror "systemd-repart needs systemd in the initramfs."
- return 1
- fi
-
# Return 255 to only include the module, if another module requires it.
return 255
# return 1 to not include the binary.
require_binaries systemd-sysusers || return 1
- # If the module dependency requirements are not fulfilled
- # return 1 to not include the required module(s).
- if ! dracut_module_included "systemd"; then
- derror "systemd-sysuser needs systemd in the initramfs."
- return 1
- fi
-
# Return 255 to only include the module, if another module requires it.
return 255
check() {
[[ $mount_needs ]] && return 1
- if ! dracut_module_included "systemd"; then
- derror "systemd-networkd needs systemd in the initramfs"
- return 1
- fi
-
return 255
}
require_binaries dbus-broker || return 1
require_binaries dbus-broker-launch || return 1
- # If the module dependency requirements are not fulfilled
- # return 1 to not include the required module(s).
- if ! dracut_module_included "systemd"; then
- derror "dbus-broker needs systemd in the initramfs."
- return 1
- fi
-
- if ! dracut_module_included "systemd-sysusers"; then
- derror "dbus-broker needs systemd-sysusers in the initramfs."
- return 1
- fi
-
- # dbus-broker conflicts with dbus.
-
- if dracut_module_included "dbus"; then
- derror "dbus-broker conflicts with dbus in the initramfs."
- exit 1
- fi
-
# Return 255 to only include the module, if another module requires it.
return 255
# Module dependency requirements.
depends() {
-
# This module has external dependency on the systemd module.
echo systemd systemd-sysusers
# Return 0 to include the dependent systemd module in the initramfs.
require_binaries dbus-daemon || return 1
require_binaries dbus-send || return 1
- # If the module dependency requirements are not fulfilled
- # return 1 to not include the required module(s).
- if ! dracut_module_included "systemd"; then
- derror "dbus needs systemd in the initramfs."
- return 1
- fi
-
# dbus conflicts with dbus-broker.
if dracut_module_included "dbus-broker"; then
derror "dbus conflicts with dbus-broker in the initramfs."
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-depends() {
- echo systemd
- return 0
-}
-
check() {
# if there's no rngd binary, no go.
require_binaries rngd || return 1
return 0
}
+depends() {
+ echo systemd
+ return 0
+}
+
install() {
inst rngd
inst_simple "${moddir}/rngd.service" "${systemdsystemunitdir}/rngd.service"
# Module dependency requirements.
depends() {
+ local _module
# Add a dbus meta dependency based on the module in use.
- for module in dbus-daemon dbus-broker; do
- if dracut_module_included "$module" ; then
- dbus="$module"
- break
+ for _module in dbus-daemon dbus-broker; do
+ if dracut_module_included "$_module" ; then
+ echo "$_module"
+ return 0
fi
done;
- echo "$dbus"
- return 0
+ if find_binary dbus-broker &> /dev/null ; then
+ echo "dbus-broker"
+ return 0
+ else
+ echo "dbus-daemon"
+ return 0
+ fi
+
+ return 1
}
done;
if [ -z "$network_handler" ]; then
- if require_binaries wicked; then
+ if find_binary wicked &>/dev/null ; then
network_handler="network-wicked"
elif [ -x "$dracutsysrootdir/usr/libexec/nm-initrd-generator" ]; then
network_handler="network-manager"
check() {
[[ $mount_needs ]] && return 1
- if ! dracut_module_included "systemd-initrd"; then
- derror "dracut-systemd needs systemd-initrd in the initramfs"
- return 1
- fi
-
return 0
}
#!/bin/bash
check() {
- if ! dracut_module_included "systemd-initrd"; then
- derror "dracut-squash only supports systemd bases initramfs"
- return 1
- fi
-
- if ! find_binary mksquashfs >/dev/null || ! find_binary unsquashfs >/dev/null ; then
- derror "dracut-squash module requires squashfs-tools"
- return 1
- fi
+ require_binaries mksquashfs unsquashfs || return 1
for i in CONFIG_SQUASHFS CONFIG_BLK_DEV_LOOP CONFIG_OVERLAY_FS ; do
if ! check_kernel_config $i; then
- derror "dracut-squash module requires kernel configuration $i (y or m)"
+ dinfo "dracut-squash module requires kernel configuration $i (y or m)"
return 1
fi
done