diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2019-02-26 12:43:13 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-03-03 15:38:13 +0000 |
commit | 40bc0ed88062906c310642d4fb958d34d407e98e (patch) | |
tree | 203ff475d7c1bd3e20796cf92de8170b61b63bc7 /meta/recipes-core/systemd/systemd-conf_241.bb | |
parent | 4eb2b3f1503a41474d0c40ada296a9800840267c (diff) | |
download | poky-40bc0ed88062906c310642d4fb958d34d407e98e.tar.gz |
systemd-conf: add version info in recipe name
(From OE-Core rev: 9a56b4ee0e3f7be76fb1b018bd639ae68d0ca2bd)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd/systemd-conf_241.bb')
-rw-r--r-- | meta/recipes-core/systemd/systemd-conf_241.bb | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd-conf_241.bb b/meta/recipes-core/systemd/systemd-conf_241.bb new file mode 100644 index 0000000000..9bb27fd96d --- /dev/null +++ b/meta/recipes-core/systemd/systemd-conf_241.bb | |||
@@ -0,0 +1,53 @@ | |||
1 | require systemd.inc | ||
2 | |||
3 | SUMMARY = "Systemd system configuration" | ||
4 | DESCRIPTION = "Systemd may require slightly different configuration for \ | ||
5 | different machines. For example, qemu machines require a longer \ | ||
6 | DefaultTimeoutStartSec setting." | ||
7 | |||
8 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
9 | |||
10 | CONFFILES_${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 | |||
17 | FILES_${PN} = "${sysconfdir}/machine-id ${sysconfdir}/systemd" | ||
18 | |||
19 | do_configure[noexec] = '1' | ||
20 | do_compile[noexec] = '1' | ||
21 | |||
22 | do_install() { | ||
23 | rm -rf ${D}/${sysconfdir}/systemd | ||
24 | install -d ${D}/${sysconfdir}/systemd | ||
25 | |||
26 | # Create machine-id | ||
27 | # 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 | ||
28 | touch ${D}${sysconfdir}/machine-id | ||
29 | |||
30 | install -m 0644 ${S}/src/coredump/coredump.conf ${D}${sysconfdir}/systemd/coredump.conf | ||
31 | |||
32 | install -m 0644 ${S}/src/journal/journald.conf ${D}${sysconfdir}/systemd/journald.conf | ||
33 | # Enable journal to forward message to syslog daemon | ||
34 | sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf | ||
35 | # Set the maximium size of runtime journal to 64M as default | ||
36 | sed -i -e 's/.*RuntimeMaxUse.*/RuntimeMaxUse=64M/' ${D}${sysconfdir}/systemd/journald.conf | ||
37 | |||
38 | install -m 0644 ${S}/src/login/logind.conf.in ${D}${sysconfdir}/systemd/logind.conf | ||
39 | # Set KILL_USER_PROCESSES to yes | ||
40 | sed -i -e 's/@KILL_USER_PROCESSES@/yes/' ${D}${sysconfdir}/systemd/logind.conf | ||
41 | |||
42 | install -m 0644 ${S}/src/core/system.conf.in ${D}${sysconfdir}/systemd/system.conf | ||
43 | # Set MEMORY_ACCOUNTING_DEFAULT to yes | ||
44 | sed -i -e 's/@MEMORY_ACCOUNTING_DEFAULT@/yes/' ${D}${sysconfdir}/systemd/system.conf | ||
45 | |||
46 | install -m 0644 ${S}/src/core/user.conf ${D}${sysconfdir}/systemd/user.conf | ||
47 | } | ||
48 | |||
49 | # Based on change from YP bug 8141, OE commit 5196d7bacaef1076c361adaa2867be31759c1b52 | ||
50 | do_install_append_qemuall() { | ||
51 | # Change DefaultTimeoutStartSec from 90s to 240s | ||
52 | echo "DefaultTimeoutStartSec = 240s" >> ${D}${sysconfdir}/systemd/system.conf | ||
53 | } | ||