该命令sudo systemctl status watchdog
显示它已“死亡”。该命令sudo systemctl enable watchdog
没有帮助。该命令sudo systemctl start watchdog
启动它(并且它工作正常),但只能在重新启动之前。
$ cat /etc/default/watchdog
# Start watchdog at boot time? 0 or 1
run_watchdog=1
# Start wd_keepalive after stopping watchdog? 0 or 1
run_wd_keepalive=1
# Load module before starting watchdog
watchdog_module="none"
# Specify additional watchdog options here (see manpage).
答案1
文件/lib/systemd/system/watchdog.service
没有 [Install] 部分。解决方法是将其复制到其中/etc/systemd/system
并根据需要进行修改。