summaryrefslogtreecommitdiffstats
path: root/rules.d
diff options
context:
space:
mode:
authorChengen Du <chengen.du@canonical.com>2024-08-12 05:41:52 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-08-15 08:38:46 +0200
commit6bd12be3fa7761f190e17efdbdbff4440da7528b (patch)
tree6aeffffec7e52b598b3764f057bfcdd91f0f55ce /rules.d
parentMerge pull request #33955 from yuwata/sd-journal-fix-sd_journal_seek_monotoni... (diff)
downloadsystemd-6bd12be3fa7761f190e17efdbdbff4440da7528b.tar.xz
systemd-6bd12be3fa7761f190e17efdbdbff4440da7528b.zip
udev: Handle PTP device symlink properly on udev action 'change'
PTP device symlink creation rules are currently executed only when the udev action is 'add'. If a user reloads the rules and runs the udevadm trigger command to reapply changes, the symlink may be deleted, which can prevent the chronyd service from restarting properly. Signed-off-by: Chengen Du <chengen.du@canonical.com>
Diffstat (limited to 'rules.d')
-rw-r--r--rules.d/50-udev-default.rules.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/rules.d/50-udev-default.rules.in b/rules.d/50-udev-default.rules.in
index 9b00c7037e..6f80feeecf 100644
--- a/rules.d/50-udev-default.rules.in
+++ b/rules.d/50-udev-default.rules.in
@@ -30,6 +30,9 @@ SUBSYSTEM=="pci|usb|platform", IMPORT{builtin}="path_id"
SUBSYSTEM=="net", IMPORT{builtin}="net_driver"
+SUBSYSTEM=="ptp", ATTR{clock_name}=="KVM virtual PTP", SYMLINK+="ptp_kvm"
+SUBSYSTEM=="ptp", ATTR{clock_name}=="hyperv", SYMLINK+="ptp_hyperv"
+
ACTION!="add", GOTO="default_end"
SUBSYSTEM=="tty", KERNEL=="ptmx", GROUP="tty", MODE="0666"
@@ -116,7 +119,4 @@ KERNEL=="vhost-net", GROUP="kvm", MODE="{{DEV_KVM_MODE}}", OPTIONS+="static_node
KERNEL=="udmabuf", GROUP="kvm"
-SUBSYSTEM=="ptp", ATTR{clock_name}=="KVM virtual PTP", SYMLINK+="ptp_kvm"
-SUBSYSTEM=="ptp", ATTR{clock_name}=="hyperv", SYMLINK+="ptp_hyperv"
-
LABEL="default_end"