启动时未触发 systemd 路径存在

启动时未触发 systemd 路径存在

我尝试使用 systemd 路径单元在 ArchLinux 上配置轨迹点灵敏度,如下所述:https://wiki.archlinux.org/index.php/TrackPoint#systemd.path_unit

我的文件如下所示:

/etc/systemd/system/trackpoint_parameter.path
-----
[Unit]
Description=Watch for, and modify, Trackpoint attributes

[Path]
PathExists=/sys/devices/platform/i8042/serio1/serio2/sensitivity

[Install]
WantedBy=default.target

/etc/systemd/system/trackpoint_parameter.service
-----
[Unit]
Description=Set TrackPoint attributes

[Service]
ExecStart=/usr/local/bin/trackpoint_configuration.sh

因此,我启用了路径单元,并且由于文件存在,所以我的脚本被执行。到目前为止,一切都按预期进行。但是,当我启动笔记本电脑时,路径单元已启动(根据启动后的状态),但它从未触发服务(根据其状态),因此脚本不会执行。

如果我再次禁用路径单元(在启动失败后),服务单元会突然被触发。

有谁知道我做错了什么/我如何才能更深入地挖掘?

相关内容