2 # This file is part of dracut.
3 # SPDX-License-Identifier: GPL-2.0-or-later
5 # Prerequisite check(s) for module.
8 # If the binary(s) requirements are not fulfilled
9 # return 1 to not include the binary.
10 require_binaries systemd-sysusers ||
return 1
12 # If the module dependency requirements are not fulfilled
13 # return 1 to not include the required module(s).
14 if ! dracut_module_included
"systemd"; then
15 derror
"systemd-sysuser needs systemd in the initramfs."
19 # Return 255 to only include the module, if another module requires it.
24 # Module dependency requirements.
27 # This module has external dependency on the systemd module.
29 # Return 0 to include the dependent systemd module in the initramfs.
34 # Install the required file(s) for the module in the initramfs.
38 # Install the system users and groups configuration file.
39 $sysusers/basic.conf \
40 # Install the systemd users and groups configuration file.
41 $sysusers/systemd.conf \
42 # Install the systemd type service unit for sysusers.
43 $systemdsystemunitdir/systemd-sysusers.service \
44 # Install the binary executable(s) for sysusers.
47 # Install the hosts local user configurations if enabled.
48 if [[ $hostonly ]]; then
50 $sysusersconfdir/basic.conf \
51 $sysusersconfdir/systemd.conf \
52 $systemdsystemconfdir/systemd-sysusers.service \
53 $systemdsystemconfdir/systemd-sysusers.service.d
/*.conf
57 # Enable the systemd type service unit for sysusers.
58 $SYSTEMCTL -q --root "$initdir" enable systemd-sysusers.service