0

I have a weird behavior that I cannot understand. I am running on a Raspberry Pi OS (Debian Trixie).

If I create a simple file /lib/systemd/system/foo.service without enabling it.

[Unit]
Description=Foo

[Service]
Type=oneshot
ExecStart=/bin/echo FOO

[Install]
WantedBy=multi-user.target

It somehow gets started after I reboot even though I did not enable it and ends up as a symlink in /etc/systemd/system/multi-user.target.wants/foo.service. If I disable it the symlink disappears but reappears after a reboot.

I checked the presets in /lib/systemd/system-preset/*.preset but there is no wildcard.

What else could I check and is this an expected behavior? I have an Arch Linux machine as well as an Ubuntu one on my PC and I do not see this behavior.

1 Answer 1

0

Okay I have figured out, /etc/machine-id did not exist yet since I am using /etc as an overlay so it does not persist across reboots.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.