title: Disable a standard systemd service in Yocto build
body: <p>I need to start my own <code>systemd</code> service, let's call it <code>custom.service</code>. I know how to write a recipe for it to be added and enabled on boot:</p>
  
  <pre><code>SYSTEMD_SERVICE_${PN} = "custom.service"
  SYSTEMD_AUTO_ENABLE_${PN} = "enable"
  </code></pre>
  
  <p>However, it conflicts with one of the default <code>systemd</code> services - <code>systemd-timesyncd.service</code>.</p>
  
  <p>Is there a nice preferred way to disable that default <code>systemd</code> service in my bitbake file even though the <code>systemd_XX.bb</code> actually enables it?</p>
  
  <p>I can create a <code>systemd_%.bbappend</code> file to modify the <code>systemd</code> settings, but I can't locate the place where one service can be disabled leaving all others enabled.</p>
  
  <hr>
  
  <p>The working solution I found is to remove the <code>timesyncd</code> altogether using</p>
  
  <pre><code>PACKAGECONFIG_remove = "timesyncd"
  </code></pre>
  
  <p>But I wonder if this is a appropriate way and if there is a way to just disable it, but leave in the system.</p>