sysext: make some calls available via varlink

This commit is contained in:
Lennart Poettering
2023-10-09 18:57:41 +02:00
parent c7fda70716
commit f5151fb459
11 changed files with 593 additions and 75 deletions

View File

@@ -529,6 +529,15 @@ units = [
'file' : 'systemd-sysext.service',
'conditions' : ['ENABLE_SYSEXT'],
},
{
'file' : 'systemd-sysext.socket',
'conditions' : ['ENABLE_SYSEXT'],
'symlinks' : ['sockets.target.wants/'],
},
{
'file' : 'systemd-sysext@.service',
'conditions' : ['ENABLE_SYSEXT'],
},
{
'file' : 'systemd-sysupdate-reboot.service.in',
'conditions' : ['ENABLE_SYSUPDATE'],

View File

@@ -0,0 +1,25 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=System Extension Image Management (Varlink)
Documentation=man:systemd-sysext(8)
DefaultDependencies=no
After=local-fs.target
Before=sockets.target
ConditionCapability=CAP_SYS_ADMIN
[Socket]
ListenStream=/run/systemd/io.systemd.sysext
FileDescriptorName=varlink
SocketMode=0600
Accept=yes
[Install]
WantedBy=sockets.target

View File

@@ -0,0 +1,20 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=System Extension Image Management (Varlink)
Documentation=man:systemd-sysext(8)
DefaultDependencies=no
After=local-fs.target
Conflicts=shutdown.target initrd-switch-root.target
Before=shutdown.target initrd-switch-root.target
[Service]
Environment=LISTEN_FDNAMES=varlink
ExecStart=-systemd-sysext