diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-12-21 23:07:50 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2025-01-07 12:31:15 +0100 |
commit | 2bc733d9b0e9c0b850ed523f5d1695cddb0c23d7 (patch) | |
tree | 2670be75a28c7dadea046be678ae4af7266fa2c0 /units | |
parent | udevadm: use varlink connection to send ping (diff) | |
download | systemd-2bc733d9b0e9c0b850ed523f5d1695cddb0c23d7.tar.xz systemd-2bc733d9b0e9c0b850ed523f5d1695cddb0c23d7.zip |
units: introduce systemd-udevd-varlink.socket
Co-authored-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'units')
-rw-r--r-- | units/initrd-udevadm-cleanup-db.service | 4 | ||||
-rw-r--r-- | units/meson.build | 4 | ||||
-rw-r--r-- | units/systemd-udev-trigger.service | 2 | ||||
-rw-r--r-- | units/systemd-udevd-varlink.socket | 22 | ||||
-rw-r--r-- | units/systemd-udevd.service.in | 2 |
5 files changed, 30 insertions, 4 deletions
diff --git a/units/initrd-udevadm-cleanup-db.service b/units/initrd-udevadm-cleanup-db.service index bc444736fd..6c0a1e16ae 100644 --- a/units/initrd-udevadm-cleanup-db.service +++ b/units/initrd-udevadm-cleanup-db.service @@ -11,8 +11,8 @@ Description=Cleanup udev Database DefaultDependencies=no AssertPathExists=/etc/initrd-release -Conflicts=systemd-udevd.service systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-udev-trigger.service systemd-udev-settle.service -After=systemd-udevd.service systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-udev-trigger.service systemd-udev-settle.service +Conflicts=systemd-udevd.service systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-udevd-varlink.socket systemd-udev-trigger.service systemd-udev-settle.service +After=systemd-udevd.service systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-udevd-varlink.socket systemd-udev-trigger.service systemd-udev-settle.service Before=initrd-switch-root.target [Service] diff --git a/units/meson.build b/units/meson.build index f6d661da97..805991dfe4 100644 --- a/units/meson.build +++ b/units/meson.build @@ -733,6 +733,10 @@ units = [ 'symlinks' : ['sockets.target.wants/'], }, { + 'file' : 'systemd-udevd-varlink.socket', + 'symlinks' : ['sockets.target.wants/'], + }, + { 'file' : 'systemd-udevd.service.in', 'symlinks' : ['sysinit.target.wants/'], }, diff --git a/units/systemd-udev-trigger.service b/units/systemd-udev-trigger.service index cb1e4f9fea..0ea1a4bd49 100644 --- a/units/systemd-udev-trigger.service +++ b/units/systemd-udev-trigger.service @@ -12,7 +12,7 @@ Description=Coldplug All udev Devices Documentation=man:udev(7) man:systemd-udevd.service(8) DefaultDependencies=no Wants=systemd-udevd.service -After=systemd-udevd-kernel.socket systemd-udevd-control.socket +After=systemd-udevd-kernel.socket systemd-udevd-control.socket systemd-udevd-varlink.socket Before=sysinit.target ConditionPathIsReadWrite=/sys diff --git a/units/systemd-udevd-varlink.socket b/units/systemd-udevd-varlink.socket new file mode 100644 index 0000000000..94fee15b08 --- /dev/null +++ b/units/systemd-udevd-varlink.socket @@ -0,0 +1,22 @@ +# 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=udev Varlink Socket +Documentation=man:systemd-udevd-varlink.socket(8) man:udev(7) +DefaultDependencies=no +Before=sockets.target +ConditionPathIsReadWrite=/sys + +[Socket] +Service=systemd-udevd.service +ListenStream=/run/udev/io.systemd.Udev +FileDescriptorName=varlink +SocketMode=0600 +RemoveOnStop=yes diff --git a/units/systemd-udevd.service.in b/units/systemd-udevd.service.in index f4a4482088..13ec7088da 100644 --- a/units/systemd-udevd.service.in +++ b/units/systemd-udevd.service.in @@ -23,7 +23,7 @@ DelegateSubgroup=udev Type=notify-reload # Note that udev will reset the value internally for its workers OOMScoreAdjust=-1000 -Sockets=systemd-udevd-control.socket systemd-udevd-kernel.socket +Sockets=systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-udevd-varlink.socket Restart=always RestartSec=0 ExecStart={{LIBEXECDIR}}/systemd-udevd |