Skip to content

Commit

Permalink
systemd: add helper service to start sysext services
Browse files Browse the repository at this point in the history
As systemd-sysext images are not really meant for system services
(that is the role of portable services) the services that they define
don't get started even if they include the symlinks to do so.
Add a helper service that starts the new services by retriggering the
socket and multi-user targets as these are the targets a user would
normally use to enable services. We can add more as needed.
  • Loading branch information
pothos committed Mar 16, 2022
1 parent 2231de7 commit 2c57c47
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions systemd/system/ensure-sysext.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Unit]
BindsTo=systemd-sysext.service
After=systemd-sysext.service
DefaultDependencies=no
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/systemctl daemon-reload
ExecStart=/usr/bin/systemctl restart --no-block sockets.target multi-user.target
[Install]
WantedBy=sysinit.target
1 change: 1 addition & 0 deletions systemd/system/sysinit.target.wants/ensure-sysext.service

0 comments on commit 2c57c47

Please sign in to comment.