From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- web/attachments/309099-check_disk.txt | 68 +++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 web/attachments/309099-check_disk.txt (limited to 'web/attachments/309099-check_disk.txt') diff --git a/web/attachments/309099-check_disk.txt b/web/attachments/309099-check_disk.txt new file mode 100644 index 0000000..500ab18 --- /dev/null +++ b/web/attachments/309099-check_disk.txt @@ -0,0 +1,68 @@ +*** plugins/check_disk.c.orig Thu Jul 10 11:03:55 2008 +--- plugins/check_disk.c Wed Jan 14 11:49:37 2009 +*************** +*** 155,160 **** +--- 155,161 ---- + int path_selected = FALSE; + char *group = NULL; + struct stat *stat_buf; ++ int no_match_ok = 0; + + + int +*************** +*** 493,498 **** +--- 494,500 ---- + {"ignore-ereg-partition", required_argument, 0, 'i'}, + {"ignore-eregi-path", required_argument, 0, 'I'}, + {"ignore-eregi-partition", required_argument, 0, 'I'}, ++ {"no-match-ok", no_argument, 0, 'n'}, + {"local", no_argument, 0, 'l'}, + {"stat-remote-fs", no_argument, 0, 'L'}, + {"mountpoint", no_argument, 0, 'M'}, +*************** +*** 517,523 **** + strcpy (argv[c], "-t"); + + while (1) { +! c = getopt_long (argc, argv, "+?VqhveCt:c:w:K:W:u:p:x:X:mklLg:R:r:i:I:MEA", longopts, &option); + + if (c == -1 || c == EOF) + break; +--- 519,525 ---- + strcpy (argv[c], "-t"); + + while (1) { +! c = getopt_long (argc, argv, "+?VqhveCt:c:w:K:W:u:p:x:X:mklLg:R:r:i:I:MEAn", longopts, &option); + + if (c == -1 || c == EOF) + break; +*************** +*** 669,674 **** +--- 671,679 ---- + die (STATE_UNKNOWN, "DISK %s: %s", _("UNKNOWN"), _("Must set group value before selecting pathes \n")); + group = optarg; + break; ++ case 'n': /* Don't complain if a regular expression doesn't match anything */ ++ no_match_ok = 1; ++ break; + case 'I': + cflags |= REG_ICASE; + case 'i': +*************** +*** 741,747 **** + } + } + +! if (!fnd) + die (STATE_UNKNOWN, "DISK %s: %s - %s\n",_("UNKNOWN"), + _("Regular expression did not match any path or disk"), optarg); + +--- 746,752 ---- + } + } + +! if (!fnd && !no_match_ok) + die (STATE_UNKNOWN, "DISK %s: %s - %s\n",_("UNKNOWN"), + _("Regular expression did not match any path or disk"), optarg); + -- cgit v1.2.3-74-g34f1