Code

Convert tabs to spaces from dig's answer section (Randy O'Meara - 1107651)
[nagiosplug.git] / plugins / check_dns.c
index 20cb6dd87a513de9f9027153d089c74ec1cf5092..94d4300c85e5f54c004120549a62b3f21562813f 100644 (file)
@@ -135,7 +135,7 @@ main (int argc, char **argv)
                                asprintf(&address, "%s,%s", address, temp_buffer);
                }
 
-               else if (strstr (input_buffer, "Non-authoritative answer:")) {
+               else if (strstr (input_buffer, _("Non-authoritative answer:"))) {
                        non_authoritative = TRUE;
                }
 
@@ -224,9 +224,9 @@ error_scan (char *input_buffer)
 {
 
        /* the DNS lookup timed out */
-       if (strstr (input_buffer, "Note: nslookup is deprecated and may be removed from future releases.") ||
-           strstr (input_buffer, "Consider using the `dig' or `host' programs instead.  Run nslookup with") ||
-           strstr (input_buffer, "the `-sil[ent]' option to prevent this message from appearing."))
+       if (strstr (input_buffer, _("Note: nslookup is deprecated and may be removed from future releases.")) ||
+           strstr (input_buffer, _("Consider using the `dig' or `host' programs instead.  Run nslookup with")) ||
+           strstr (input_buffer, _("the `-sil[ent]' option to prevent this message from appearing.")))
                return STATE_OK;
 
        /* DNS server is not running... */
@@ -277,7 +277,6 @@ error_scan (char *input_buffer)
 }
 
 
-
 /* process command-line arguments */
 int
 process_arguments (int argc, char **argv)
@@ -313,9 +312,7 @@ process_arguments (int argc, char **argv)
 
                switch (c) {
                case '?': /* args not parsable */
-                       printf (_("%s: Unknown argument: %s\n\n"), progname, optarg);
-                       print_usage ();
-                       exit (STATE_UNKNOWN);
+                       usage2 (_("Unknown argument"), optarg);
                case 'h': /* help */
                        print_help ();
                        exit (STATE_OK);
@@ -386,7 +383,6 @@ process_arguments (int argc, char **argv)
 }
 
 
-
 int
 validate_arguments ()
 {
@@ -397,7 +393,6 @@ validate_arguments ()
 }
 
 
-
 void
 print_help (void)
 {
@@ -432,7 +427,6 @@ specified in /etc/resolv.conf will be used.\n\n"));
 }
 
 
-
 void
 print_usage (void)
 {