我需要systemd-tmpfiles --create在引导过程中使用 systemd 发行版运行。所以我需要创建一个 systemd .service 文件来完成这项工作。
在这个问题中,您可以阅读有关我需要什么以及为什么需要的所有详细信息:systemd-tmpfiles 如何工作?
我已经阅读了一些关于它的文档,我正在编写以下测试:
[Unit]
Description=Execute tmpfiles to disable usb-wakeup # see details in the link above
Requires=multi-user.target # see details in the link above
After=multi-user.target # see details in the link above
[Service]
Type=oneshot
ExecStart=/usr/bin/systemd-tmpfiles --create
[Install]
WantedBy=multi-user.target
Run Code Online (Sandbox Code Playgroud)
但我不确定,因为systemd-tmpfiles它不是一个简单的程序,而是一个 systemd 本身。我不想破坏我的系统。
关于正确的 .service 文件的任何提示?