mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
udev: set clock group for PTP and RTC devices
Add a new group for clock devices to enable applications like linuxptp to open clocks without root privileges.
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
0ec19b311b
commit
af96ccfc24
@@ -10,6 +10,7 @@ SUBSYSTEM=="block", KERNEL=="md*", ENV{ID_IGNORE_DISKSEQ}="1"
|
||||
|
||||
SUBSYSTEM=="virtio-ports", KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}"
|
||||
|
||||
SUBSYSTEM=="rtc", GROUP="clock", MODE="0660"
|
||||
# select "system RTC" or just use the first one
|
||||
SUBSYSTEM=="rtc", ATTR{hctosys}=="1", SYMLINK+="rtc"
|
||||
SUBSYSTEM=="rtc", KERNEL=="rtc0", SYMLINK+="rtc", OPTIONS+="link_priority=-100"
|
||||
@@ -30,6 +31,7 @@ SUBSYSTEM=="pci|usb|platform", IMPORT{builtin}="path_id"
|
||||
|
||||
SUBSYSTEM=="net", IMPORT{builtin}="net_driver"
|
||||
|
||||
SUBSYSTEM=="ptp", GROUP="clock", MODE="0660"
|
||||
SUBSYSTEM=="ptp", ATTR{clock_name}=="KVM virtual PTP", SYMLINK+="ptp_kvm"
|
||||
SUBSYSTEM=="ptp", ATTR{clock_name}=="hyperv", SYMLINK+="ptp_hyperv"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user