Package: watchdog Version: 5.2.4-4 Severity: important
Hello everyone, the option ping-count isn't documented and doesn't work. Per default watchdog tried three times to ping a host. With the option ping-count it is supposed to change this number via the configfile. This is important because my server just rebooted because of this check failed because I guess 3 times wasn't enough. However the source code has this option in, but watchdog isn't able to parse the line because it is tested after the "ping" option and since "ping" is a prefix to "ping-count" it tries to parse "ping-count" as "ping" and fails. The fix is obvious: First check for "ping-count" than for "ping", a patch is attached. Thanks, Thomas --- a/src/watchdog.c +++ b/src/watchdog.c @@ -295,6 +295,11 @@ fprintf(stderr, "Ignoring invalid line in config file:\n%s\n", line); else add_list(&pidfile, strdup(line + i)); + } else if (strncmp(line + i, PINGCOUNT, strlen(PINGCOUNT)) == 0) { + if (spool(line, &i, strlen(PINGCOUNT))) + fprintf(stderr, "Ignoring invalid line in config file:\n%s\n", line); + else + pingcount = atol(line + i); } else if (strncmp(line + i, PING, strlen(PING)) == 0) { if (spool(line, &i, strlen(PING))) fprintf(stderr, "Ignoring invalid line in config file:\n%s\n", line); @@ -398,11 +403,6 @@ else { minpages = atol(line + i); } - } else if (strncmp(line + i, PINGCOUNT, strlen(PINGCOUNT)) == 0) { - if (spool(line, &i, strlen(PINGCOUNT))) - fprintf(stderr, "Ignoring invalid line in config file:\n%s\n", line); - else - pingcount = atol(line + i); } else { fprintf(stderr, "Ignoring invalid line in config file:\n%s\n", line); } -- System Information: Debian Release: 3.1 Architecture: i386 (i686) Kernel: Linux 2.6.17-rc3 Locale: LANG=C, [EMAIL PROTECTED] (charmap=ISO-8859-15) Versions of packages watchdog depends on: ii libc6 2.3.2.ds1-22sarge3 GNU C Library: Shared libraries an ii makedev 2.3.1-77 creates device files in /dev -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]