이것이 작동하는지에 대한 문서 systemd
가 약간 모호합니다.ProtectKernelTunables
부분:
이 설정의 경우 마운트 전파 및 권한에 대한 동일한 제한 사항이 ReadOnlyPaths= 및 관련 호출에 적용됩니다(위 참조).
이로 ProtectKernelTunables=yes
인해 ReadWritePaths=/sys/class/leds
. 그러나 시도하면 로그에 다음이 표시됩니다.
Dec 03 03:33:55 radio00000 systemd[25829]: /run/systemd/unit-root/sys is duplicate.
Dec 03 03:33:55 radio00000 systemd[25829]: /run/systemd/unit-root/sys is duplicate.
...
Dec 03 03:33:55 radio00000 systemd[25829]: Successfully mounted /run/systemd/unit-root/proc/sys to /run/systemd/unit-root/proc/sys
...
Dec 03 03:33:56 radio00000 systemd[25829]: Applying namespace mount on /run/systemd/unit-root/sys/class/leds
Dec 03 03:33:56 radio00000 systemd[25829]: Successfully mounted /run/systemd/unit-root/sys/class/leds to /run/systemd/unit-root/sys/class/leds
...
Dec 03 03:33:56 radio00000 systemd[25829]: Not remounting /run/systemd/unit-root/sys, because blacklisted by /run/systemd/unit-root/sys, called for /run/systemd/unit-root
...
Dec 03 03:33:56 radio00000 systemd[25829]: Not remounting /run/systemd/unit-root/proc/sys, because blacklisted by /run/systemd/unit-root/proc, called for /run/systemd/unit-root
...
Dec 03 03:33:56 radio00000 systemd[25829]: Not remounting /run/systemd/unit-root/sys/class/leds, because blacklisted by /run/systemd/unit-root/sys, called for /run/systemd/unit-root
...
Dec 03 03:33:56 radio00000 systemd[25829]: Not remounting /run/systemd/unit-root/sys, because blacklisted by /run/systemd/unit-root/sys, called for /run/systemd/unit-root
...
Dec 03 03:33:56 radio00000 systemd[25829]: Not remounting /run/systemd/unit-root/sys/class/leds, because blacklisted by /run/systemd/unit-root/sys, called for /run/systemd/unit-root
...
Dec 03 03:33:56 radio00000 systemd[25829]: Remounted /run/systemd/unit-root/proc/sys read-only.
...
Dec 03 03:33:56 radio00000 systemd[25829]: Not remounting /run/systemd/unit-root/sys/class/leds, because blacklisted by /run/systemd/unit-root/sys/class/leds, called for /run/systemd/unit-root/sys
...
Dec 03 03:33:56 radio00000 systemd[25829]: Remounted /run/systemd/unit-root/sys read-only.
...
Dec 03 03:33:56 radio00000 systemd[25829]: Not remounting /run/systemd/unit-root/sys/class/leds, because blacklisted by /run/systemd/unit-root/sys/class/leds, called for /run/systemd/unit-root/sys
...
그런 다음 내 데몬에서 :
Dec 03 03:33:56 radio00000 lightsd[25829]: Cannot open /sys/class/leds/led-msg/brightness: Read-only file system
사실 내가 노력하면
ReadOnlyPaths=/sys
ReadWritePaths=/sys/class/leds
나는 같은 문제를 가지고있다. 이것이 작동해야 할 것 같습니다. 이것은 systemd239의 알려진 버그입니까? 불가능한 일을 하고 있는 걸까요, 아니면 중요한 것을 놓치고 있는 걸까요?
시스템 239, Linux 4.19를 사용하고 있습니다.