summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-12-21 23:07:50 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2025-01-07 12:31:15 +0100
commit2bc733d9b0e9c0b850ed523f5d1695cddb0c23d7 (patch)
tree2670be75a28c7dadea046be678ae4af7266fa2c0
parentudevadm: use varlink connection to send ping (diff)
downloadsystemd-2bc733d9b0e9c0b850ed523f5d1695cddb0c23d7.tar.xz
systemd-2bc733d9b0e9c0b850ed523f5d1695cddb0c23d7.zip
units: introduce systemd-udevd-varlink.socket
Co-authored-by: David Tardon <dtardon@redhat.com>
-rw-r--r--man/rules/meson.build3
-rw-r--r--man/systemd-udevd.service.xml2
-rw-r--r--man/udevadm.xml2
-rw-r--r--units/initrd-udevadm-cleanup-db.service4
-rw-r--r--units/meson.build4
-rw-r--r--units/systemd-udev-trigger.service2
-rw-r--r--units/systemd-udevd-varlink.socket22
-rw-r--r--units/systemd-udevd.service.in2
8 files changed, 35 insertions, 6 deletions
diff --git a/man/rules/meson.build b/man/rules/meson.build
index d281842396..4fe9ca17b8 100644
--- a/man/rules/meson.build
+++ b/man/rules/meson.build
@@ -1143,7 +1143,8 @@ manpages = [
'8',
['systemd-udevd',
'systemd-udevd-control.socket',
- 'systemd-udevd-kernel.socket'],
+ 'systemd-udevd-kernel.socket',
+ 'systemd-udevd-varlink.socket'],
''],
['systemd-update-done.service', '8', ['systemd-update-done'], ''],
['systemd-update-utmp.service',
diff --git a/man/systemd-udevd.service.xml b/man/systemd-udevd.service.xml
index c781765e1c..ad0be5bdab 100644
--- a/man/systemd-udevd.service.xml
+++ b/man/systemd-udevd.service.xml
@@ -20,6 +20,7 @@
<refname>systemd-udevd.service</refname>
<refname>systemd-udevd-control.socket</refname>
<refname>systemd-udevd-kernel.socket</refname>
+ <refname>systemd-udevd-varlink.socket</refname>
<refname>systemd-udevd</refname>
<refpurpose>Device event managing daemon</refpurpose>
</refnamediv>
@@ -28,6 +29,7 @@
<para><filename>systemd-udevd.service</filename></para>
<para><filename>systemd-udevd-control.socket</filename></para>
<para><filename>systemd-udevd-kernel.socket</filename></para>
+ <para><filename>systemd-udevd-varlink.socket</filename></para>
<cmdsynopsis>
<command>/usr/lib/systemd/systemd-udevd</command>
diff --git a/man/udevadm.xml b/man/udevadm.xml
index 8923bc70fe..13cf106d87 100644
--- a/man/udevadm.xml
+++ b/man/udevadm.xml
@@ -677,7 +677,7 @@
Note that <filename>systemd-udevd.service</filename> contains
<option>Restart=always</option> and so as a result, this option restarts systemd-udevd.
If you want to stop <filename>systemd-udevd.service</filename>, please use the following:
- <programlisting>systemctl stop systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-udevd.service</programlisting>
+ <programlisting>systemctl stop systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-udevd-varlink.socket systemd-udevd.service</programlisting>
</para>
</listitem>
</varlistentry>
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