diff --git a/recipes-core/systemd/systemd-conf/journald.conf b/recipes-core/systemd/systemd/journald.conf similarity index 54% rename from recipes-core/systemd/systemd-conf/journald.conf rename to recipes-core/systemd/systemd/journald.conf index 163c219..9a198f5 100644 --- a/recipes-core/systemd/systemd-conf/journald.conf +++ b/recipes-core/systemd/systemd/journald.conf @@ -1,13 +1,16 @@ # This file is part of systemd. # -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. # -# Entries in this file show the compile time defaults. -# You can change settings by editing this file. -# Defaults can be restored by simply deleting this file. +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file, or by creating "drop-ins" in +# the journald.conf.d/ subdirectory. The latter is generally recommended. +# Defaults can be restored by simply deleting this file and all drop-ins. +# +# Use 'systemd-analyze cat-config systemd/journald.conf' to display the full config. # # See journald.conf(5) for details. diff --git a/recipes-core/systemd/systemd_%.bbappend b/recipes-core/systemd/systemd_%.bbappend index 8ea681a..1e5d28d 100644 --- a/recipes-core/systemd/systemd_%.bbappend +++ b/recipes-core/systemd/systemd_%.bbappend @@ -1,9 +1,22 @@ PACKAGECONFIG_remove = "nss-resolve resolved" ALTERNATIVE_${PN} = "halt reboot shutdown poweroff runlevel ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolv-conf', '', d)}" +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +SRC_URI_append = " \ + file://journald.conf \ + " # The only reason for this line is to remove os-release from "dependencies" of systemd # Having this dependency leads to a rebuild of systemd when os-release is rebuilt, # even when the recommendations are excluded. # It may not be required with future releases of yocto. RRECOMMENDS_${PN}_remove = "os-release" + +do_install_append() { + # Remove default network configurations + rm -rf ${D}${systemd_unitdir}/network + + # bring our default config file in + install -d ${D}${sysconfdir}/systemd + install -m 644 ${WORKDIR}/journald.conf ${D}${sysconfdir}/systemd +}