]>
Commit | Line | Data |
---|---|---|
3697891b JG |
1 | #!/bin/bash |
2 | # This file is part of dracut. | |
3 | # SPDX-License-Identifier: GPL-2.0-or-later | |
4 | ||
5 | # Prerequisite check(s) for module. | |
6 | check() { | |
7 | ||
8 | # If the binary(s) requirements are not fulfilled the module can't be installed. | |
9 | require_binaries \ | |
10 | journalctl \ | |
11 | "$systemdutildir"/systemd-journald \ | |
12 | || return 1 | |
13 | ||
14 | # Return 255 to only include the module, if another module requires it. | |
15 | return 255 | |
16 | ||
17 | } | |
18 | ||
19 | # Module dependency requirements. | |
20 | depends() { | |
21 | ||
4971f443 AAF |
22 | # This module has external dependency on other module(s). |
23 | echo systemd-sysusers | |
3697891b JG |
24 | # Return 0 to include the dependent module(s) in the initramfs. |
25 | return 0 | |
26 | ||
27 | } | |
28 | ||
29 | # Install the required file(s) and directories for the module in the initramfs. | |
30 | install() { | |
31 | ||
32 | inst_simple "$moddir/initrd.conf" "$systemdutildir/journald.conf.d/initrd.conf" | |
33 | ||
34 | inst_multiple -o \ | |
35 | "$systemdutildir"/journald.conf \ | |
36 | "$systemdutildir/journald.conf.d/*.conf" \ | |
37 | "$systemdutildir"/systemd-journald \ | |
38 | "$systemdsystemunitdir"/systemd-journald.service \ | |
39 | "$systemdsystemunitdir"/systemd-journald.socket \ | |
40 | "$systemdsystemunitdir"/systemd-journald@.service \ | |
41 | "$systemdsystemunitdir"/systemd-journald@.socket \ | |
42 | "$systemdsystemunitdir"/systemd-journald-audit.socket \ | |
43 | "$systemdsystemunitdir"/systemd-journald-dev-log.socket \ | |
44 | "$systemdsystemunitdir"/systemd-journald-varlink@.socket \ | |
3697891b JG |
45 | "$systemdsystemunitdir"/systemd-journal-catalog-update.service \ |
46 | "$systemdsystemunitdir"/sockets.target.wants/systemd-journald-audit.socket \ | |
47 | "$systemdsystemunitdir"/sockets.target.wants/systemd-journald-dev-log.socket \ | |
48 | "$systemdsystemunitdir"/sockets.target.wants/systemd-journald.socket \ | |
3697891b | 49 | "$systemdsystemunitdir"/sysinit.target.wants/systemd-journald.service \ |
fec93bb2 | 50 | "$sysusers"/systemd-journal.conf \ |
3697891b JG |
51 | journalctl |
52 | ||
53 | # Install library file(s) | |
54 | _arch=${DRACUT_ARCH:-$(uname -m)} | |
55 | inst_libdir_file \ | |
56 | {"tls/$_arch/",tls/,"$_arch/",}"liblz4.so.*" \ | |
57 | {"tls/$_arch/",tls/,"$_arch/",}"libzstd.so.*" \ | |
58 | {"tls/$_arch/",tls/,"$_arch/",}"liblzma.so.*" | |
59 | ||
60 | # Install the hosts local user configurations if enabled. | |
61 | if [[ $hostonly ]]; then | |
62 | inst_multiple -H -o \ | |
63 | "$systemdutilconfdir"/journald.conf \ | |
64 | "$systemdutilconfdir/journald.conf.d/*.conf" \ | |
65 | "$systemdsystemconfdir"/systemd-journald.service \ | |
66 | "$systemdsystemconfdir/systemd-journald.service.d/*.conf" \ | |
3697891b | 67 | "$systemdsystemconfdir"/systemd-journal-catalog-update.service \ |
fec93bb2 CH |
68 | "$systemdsystemconfdir/systemd-journal-catalog-update.service.d/*.conf" \ |
69 | "$sysusersconfdir"/systemd-journal.conf | |
3697891b JG |
70 | fi |
71 | ||
72 | } |