Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enabling systemd-units #2000

Closed
benschlueter opened this issue Oct 20, 2023 · 3 comments
Closed

enabling systemd-units #2000

benschlueter opened this issue Oct 20, 2023 · 3 comments
Labels

Comments

@benschlueter
Copy link
Contributor

Hello,

is there are good way of enabling systemd-units at startup?
I used to use systemctl enable in mkosi.postinst but this doesn't seem to work anymore. (Failed to enable unit: Transport endpoint is not connected)
Do I have to create the symlinks directly or is there a better way?

Thanks!

@DaanDeMeyer
Copy link
Contributor

DaanDeMeyer commented Oct 20, 2023

See #1729. You're probably missing --root $BUILDROOT

@DaanDeMeyer
Copy link
Contributor

Let's close this one, feel free to join the matrix channel listed in the readme if you have more questions

@septatrix
Copy link
Contributor

Alternatively you can use a systemd preset file which will be applied on the first boot. This would have the advantage that if you put it under /usr/lib/systemd/system-preset/*.preset you do not need to ship the /etc directory as systemd enable creates them in /etc/systemd/... by default. You could also archive the same by manually creating symlinks but that is more cumbersome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants