I am trying to find a bitbake way to add a /etc/systemd/system.conf
setting (in my case "DisableControllers=cpu") into the [Manager]
- currently the system.conf file is just filled with commented out parameters (i.e. nothing is set).
I have not found anything like SYSTEMD_CONF:append
to do this, so I guess I have to just do something like:
do_install:append() {
echo "DisableControllers=cpu" >> ${D}${sysconfdir}/systemd/system.conf
}
I can't think of a nicer way to do that - and this looks like its a bit hacky
The recipe that installs system.conf
is poky/meta/recipes-core/systemd/systemd-conf_1.0.bb
. You can also accomplish this by overriding the system.conf that gets installed to rootfs from your own layer.
system.conf
file in your layer at recipes-core/systemd/systemd-conf/system.conf
poky/meta/recipes-core/systemd/systemd-conf_%.bbappend
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
As long as your layer has priority over poky (it's priority is 5) something like this should do the trick.
Edit: If there are other layers that are fiddling with systemd-conf your layers priority needs to be higher than theirs as well.