Re: [systemd-devel] systemd enables custom service units on firstboot

2023-05-01 Thread Dan Nicholson
We just run preset-all near the end of our image (really ostree) build after all packages have been installed and nearly all customizations have been applied. Then you're recording the state of the enabled and disabled units in the image. -- Dan Nicholson | Endless OS Foundation On Mon, May 1,

Re: [systemd-devel] systemd enables custom service units on firstboot

2023-05-01 Thread Martin Petzold
Using the presets is a little tricky. Because during debootstrap Debian installation a machine-id is created and the 90-systemd.preset seems to be applied. After this initial Debian package installation there may be Debian packages installed via apt which enabled service units without using pre

Re: [systemd-devel] systemd enables custom service units on firstboot

2023-04-29 Thread Dan Nicholson
For Endless OS we went the opposite way under the idea that we don't want to have to go add an entry for every service that might get added when the packages change. Basically we work under the assumption that a package included in the OS that provides a service usually should be enabled. So, we di

Re: [systemd-devel] systemd enables custom service units on firstboot

2023-04-29 Thread Daan De Meyer
Disabling manually will still get overridden by preset on first boot. Debian does not ship 99-disable.preset because deb-systemd-helper relies on systemctl preset to enable services on install. Shipping that file would break backwards compat because no services would be enabled anymore. If I were

Re: [systemd-devel] systemd enables custom service units on firstboot

2023-04-29 Thread Martin Petzold
Dear Daan, Am 29.04.23 um 17:43 schrieb Daan De Meyer: Systemd does a preset on first boot when there's no machine ID yet. If no preset from a preset file applies, the default is to enable it. Since debian does not ship a 99-disable.preset with disable * in it, all services are enabled on firs

Re: [systemd-devel] systemd enables custom service units on firstboot

2023-04-29 Thread Daan De Meyer
Systemd does a preset on first boot when there's no machine ID yet. If no preset from a preset file applies, the default is to enable it. Since debian does not ship a 99-disable.preset with disable * in it, all services are enabled on firstboot on Debian. Cheers, Daan On Sat, 29 Apr 2023, 17:27

Re: [systemd-devel] systemd enables custom service units on firstboot

2023-04-29 Thread Martin Petzold
Dear Paul, Am 29.04.23 um 17:13 schrieb Paul Menzel: Dear Martin, Am 29.04.23 um 16:12 schrieb Martin Petzold: we are building our OS with debootstrap (Debian bullseye). Our image shall be flashed on embedded devices. In order to get a unique machine-id we removed '/etc/machine-id' as instr

Re: [systemd-devel] systemd enables custom service units on firstboot

2023-04-29 Thread Paul Menzel
Dear Martin, Am 29.04.23 um 16:12 schrieb Martin Petzold: we are building our OS with debootstrap (Debian bullseye). Our image shall be flashed on embedded devices. In order to get a unique machine-id we removed '/etc/machine-id' as instructed in [1] and also removed '/var/lib/dbus/machine-i

[systemd-devel] systemd enables custom service units on firstboot

2023-04-29 Thread Martin Petzold
Hi, we are building our OS with debootstrap (Debian bullseye). Our image shall be flashed on embedded devices. In order to get a unique machine-id we removed '/etc/machine-id' as instructed in [1] and also removed '/var/lib/dbus/machine-id' as instructed in [2]) from the golden image. After