All watchdog modules are blacklisted, so we cannot load them via /etc/modules.
Instead, watchdog-mux loads it at startup.
--- /dev/null
+# select watchdog module (default is softdog)
+#WATCHDOG_MODULE=ipmi_watchdog
\ No newline at end of file
Description=Proxmox VE watchdog multiplexer
[Service]
+EnvironmentFile=-/etc/default/pve-ha-manager
ExecStart=/usr/sbin/watchdog-mux
OOMScoreAdjust=-1000
Restart=no
+#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
* options softdog soft_noboot=1
*/
if (stat(WATCHDOG_DEV, &fs) == -1) {
- system("modprobe -q softdog"); // load softdog by default
+ char *wd_module = getenv("WATCHDOG_MODULE");
+ if (wd_module) {
+ char *cmd = NULL;
+ if ((asprintf(&cmd, "modprobe -q %s", wd_module) == -1)) {
+ perror("assemble modprobe command failed");
+ exit(EXIT_FAILURE);
+ }
+ system(cmd);
+ } else {
+ system("modprobe -q softdog"); // load softdog by default
+ }
}
if ((watchdog_fd = open(WATCHDOG_DEV, O_WRONLY)) == -1) {