udev ルールが呼び出されませんでした。

udev ルールが呼び出されませんでした。

2つのudevルールがあります。

ls -l /etc/udev/rules.d/
total 16
lrwxrwxrwx 1 root root   73 23.01.2018 10:37 95-monitor-hotplug.rules -> /home/remi/projects/github_gists/monitor_hotplug/95-monitor-hotplug.rules
-rw-r--r-- 1 root root  123 30.01.2018 19:32 95-monitor-hotplug-test.rules

以下の内容が含まれています。

cat /etc/udev/rules.d/95-monitor-hotplug-test.rules
ACTION=="change", KERNEL=="card[0-9]", SUBSYSTEM=="drm", RUN+="/bin/bash -c \"/usr/bin/date > /tmp/monitor_hotplug_date\""

cat /etc/udev/rules.d/95-monitor-hotplug.rules 
#/etc/udev/rules.d/95-monitor-hotplug.rules
ACTION=="change", KERNEL=="card[0-9]", SUBSYSTEM=="drm", RUN+="/usr/bin/bash -c  \"/usr/bin/date > /tmp/monitor_hotplug_log && /usr/bin/systemctl start monitor_hot_plug >> /tmp/monitor_hotplug_log 2>&1\""

新しい画面を挿入すると、次のようになります。

cat /tmp/monitor_hotplug_date 
Tue Feb  6 09:54:52 CET 2018

ご覧のとおり、/tmp/monitor_hotplug_logこれがない場合、シンボリックリンクを指すルールは実行されません。しかし、時には実行されます。95-monitor-hotplug-test.rules常に実行されます。これをどのように説明できますか?

また、実行されたルールを追跡する方法は?私はアーチにいます。ルールトリガーに関する情報を提供するジャーナルctlの一部のudevログは表示されません。

ベストアンサー1

おすすめ記事