summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd-conf.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd-conf.bb')
-rw-r--r--meta/recipes-core/systemd/systemd-conf.bb51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd-conf.bb b/meta/recipes-core/systemd/systemd-conf.bb
new file mode 100644
index 0000000000..c694efbbf1
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-conf.bb
@@ -0,0 +1,51 @@
1require systemd.inc
2
3SUMMARY = "Systemd system configuration"
4DESCRIPTION = "Systemd may require slightly different configuration for \
5different machines. For example, qemu machines require a longer \
6DefaultTimeoutStartSec setting."
7
8PACKAGE_ARCH = "${MACHINE_ARCH}"
9
10CONFFILES_${PN} = "${sysconfdir}/machine-id \
11${sysconfdir}/systemd/coredump.conf \
12${sysconfdir}/systemd/journald.conf \
13${sysconfdir}/systemd/logind.conf \
14${sysconfdir}/systemd/system.conf \
15${sysconfdir}/systemd/user.conf"
16
17FILES_${PN} = "${sysconfdir}/machine-id ${sysconfdir}/systemd"
18
19do_compile[noexec] = '1'
20
21do_install() {
22 install -d ${D}/${sysconfdir}/systemd
23
24 # Create machine-id
25 # 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
26 touch ${D}${sysconfdir}/machine-id
27
28 install -m 0644 ${S}/src/coredump/coredump.conf ${D}${sysconfdir}/systemd/coredump.conf
29
30 install -m 0644 ${S}/src/journal/journald.conf ${D}${sysconfdir}/systemd/journald.conf
31 # Enable journal to forward message to syslog daemon
32 sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
33 # Set the maximium size of runtime journal to 64M as default
34 sed -i -e 's/.*RuntimeMaxUse.*/RuntimeMaxUse=64M/' ${D}${sysconfdir}/systemd/journald.conf
35
36 install -m 0644 ${S}/src/login/logind.conf.in ${D}${sysconfdir}/systemd/logind.conf
37 # Set KILL_USER_PROCESSES to yes
38 sed -i -e 's/@KILL_USER_PROCESSES@/yes/' ${D}${sysconfdir}/systemd/logind.conf
39
40 install -m 0644 ${S}/src/core/system.conf.in ${D}${sysconfdir}/systemd/system.conf
41 # Set MEMORY_ACCOUNTING_DEFAULT to yes
42 sed -i -e 's/@MEMORY_ACCOUNTING_DEFAULT@/yes/' ${D}${sysconfdir}/systemd/system.conf
43
44 install -m 0644 ${S}/src/core/user.conf ${D}${sysconfdir}/systemd/user.conf
45}
46
47# Based on change from YP bug 8141, OE commit 5196d7bacaef1076c361adaa2867be31759c1b52
48do_install_append_qemuall() {
49 # Change DefaultTimeoutStartSec from 90s to 240s
50 echo "DefaultTimeoutStartSec = 240s" >> ${D}${sysconfdir}/systemd/system.conf
51}