sysext: refresh sysexts and confexts on completed system update
Bind the io.systemd.SysUpdate.Notify.OnCompletedUpdate() method in the sysext Varlink server. systemd-sysext provides a single Varlink service covering both the sysext and confext image classes, so one notification refreshes both (equivalent to "systemd-sysext refresh" plus "systemd-confext refresh"). Hook a socket into /run/systemd/sysupdate/notify/ via systemd-sysupdate-notify-sysext.socket, enabled by default via the preset.
This commit is contained in:
@@ -823,6 +823,14 @@ units = [
|
||||
'conditions' : ['ENABLE_SYSEXT'],
|
||||
'symlinks' : ['sockets.target.wants/'],
|
||||
},
|
||||
{
|
||||
'file' : 'systemd-sysupdate-notify-sysext@.service',
|
||||
'conditions' : ['ENABLE_SYSEXT'],
|
||||
},
|
||||
{
|
||||
'file' : 'systemd-sysupdate-notify-sysext.socket',
|
||||
'conditions' : ['ENABLE_SYSEXT'],
|
||||
},
|
||||
{
|
||||
'file' : 'systemd-sysext@.service',
|
||||
'conditions' : ['ENABLE_SYSEXT'],
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# 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 and Configuration Refresh on Completed System Update
|
||||
Documentation=man:systemd-sysext(8)
|
||||
DefaultDependencies=no
|
||||
After=local-fs.target
|
||||
Before=sockets.target
|
||||
ConditionCapability=CAP_SYS_ADMIN
|
||||
|
||||
[Socket]
|
||||
ListenStream=/run/systemd/sysupdate/notify/io.systemd.sysext
|
||||
FileDescriptorName=varlink
|
||||
SocketMode=0644
|
||||
Accept=yes
|
||||
MaxConnectionsPerSource=16
|
||||
XAttrEntryPoint=user.varlink=entrypoint
|
||||
XAttrListen=user.varlink=listen
|
||||
XAttrAccept=user.varlink=server
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
@@ -0,0 +1,19 @@
|
||||
# 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 and Configuration Refresh on Completed System Update
|
||||
Documentation=man:systemd-sysext(8)
|
||||
DefaultDependencies=no
|
||||
Conflicts=shutdown.target initrd-switch-root.target
|
||||
After=local-fs.target
|
||||
Before=shutdown.target initrd-switch-root.target
|
||||
|
||||
[Service]
|
||||
ExecStart=-systemd-sysext
|
||||
Reference in New Issue
Block a user