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

How to enable and start Systemd Services on FIRST boot after image build #8

Open
jradxl opened this issue Aug 23, 2024 · 1 comment

Comments

@jradxl
Copy link

jradxl commented Aug 23, 2024

I've noticed that after an arkdep build/deploy/reboot that there are some Systemd Services that are not enabled and thus not started.
For example cronie and sshd
However NetworkManager and sddm (I'm using KDE) are enabled and started.

Does your build process mark NetworkManager and sddm as enabled in some way?
As I'm not an Arch guru, is there an Arch or Systemd configuration for this [for initial boot]?

I'm not asking about systemctl enable cronie
I'm saying that executing the this and others manually after every image build and reboot seems ridiculous

If there's no available solution for this, then I guess I'm asking for a rc.local type of solution!!!

Perhaps you could add examples for cronie and sshd to your documentation , together with /arkdep/config, migrate_files=('/etc/ssh') to avoid new keys being generated on each new image reboot.
(Also, annoyingly sudo always issues the first time warning)

Do you get this? I've done the arkdep build/deploy/reboot cycle many many times now and notice that are download and unpacking errors now and again.

Thanks
John

@dennis1248
Copy link
Member

dennis1248 commented Aug 23, 2024

To enable Systemd services in a custom build you can add symlinks to the overlay directory in arkdep-build/variant/overlay/.

For example: https://github.com/arkanelinux/arkdep/tree/main/arkdep-build.d/arkanelinux/overlay/post_bootstrap/etc/systemd/system

You can create these symlinks like so;

ln -s /usr/lib/systemd/system/sshd.service arkdep-build.d/arkanelinux/etc/systemd/system/multi-user.target.wants/sshd.service

etc/ssh is a good suggestion, I added it in 59a7dd5

The sudo backup I added a few days ago in 90c6f59, when this dir is backed up it will not give the sudo warning after each update. But you would have to manually update your local config to reflect this change, I am not going to tamper with your config.

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

No branches or pull requests

2 participants