Re: Disable systemd-timesyncd.service in image

Joel A Cohen

I think you need to set SYSTEMD_AUTO_ENABLE = “disable” (actually any value other than “enable”) in your bbappend.

(It looks like SYSTEMD_AUTO_ENABLE_${PN} is intended to work too, but I can’t verify it at the moment and reading over systemd.bbclass I’m not sure if it works or not)


On Mon, Nov 23, 2020 at 11:51 AM Damien LEFEVRE <lefevre.da@...> wrote:

I would like to have systemd-timesyncd.service as part of an image but have it disabled by default.

Right now it is enabled by default which causes some issues.

I've tried systemd_%.bbappend

do_install_append() { 
    rm "$D/etc/systemd/system/dbus-org.freedesktop.timesync1.service"
    rm "$D/etc/systemd/system/"

but those symlinks are not part of the package.

I've tried this to remove the link during the package deployment during do_rootfs
pkg_postinst_${PN}_append() {
    #!/bin/sh -e
    rm "$D/etc/systemd/system/dbus-org.freedesktop.timesync1.service"
    rm "$D/etc/systemd/system/"

But at this stage the links still don't exist.

Which package is actually responsible for enabling the default services / creating the symlinks? How can we turn some of them off while keeping them in the image?


Join to automatically receive all group messages.