Code

Fix translations when extra-opts aren't enabled
[nagiosplug.git] / plugins / check_mysql_query.c
index 802e345611114be73825d39f7b411d56f03fdf2a..40adf09279fca709006a1ddd9da9548e27a01df8 100644 (file)
@@ -3,7 +3,7 @@
 * Nagios check_mysql_query plugin
 * 
 * License: GPL
-* Copyright (c) 2006-2007 Nagios Plugins Development Team
+* Copyright (c) 2006-2009 Nagios Plugins Development Team
 * Original code from check_mysql, copyright 1999 Didi Rieder
 * 
 * Description:
@@ -266,9 +266,6 @@ validate_arguments (void)
        if (db_host == NULL)
                db_host = strdup("");
 
-       if (db_pass == NULL)
-               db_pass = strdup("");
-
        if (db == NULL)
                db = strdup("");
 
@@ -292,12 +289,12 @@ print_help (void)
 
        print_usage ();
 
-       printf (_(UT_HELP_VRSN));
-       printf (_(UT_EXTRA_OPTS));
+       printf (UT_HELP_VRSN);
+       printf (UT_EXTRA_OPTS);
        printf (" -q, --query=STRING\n");
        printf ("    %s\n", _("SQL query to run. Only first column in first row will be read"));
-       printf (_(UT_WARN_CRIT_RANGE));
-       printf (_(UT_HOST_PORT), 'P', myport);
+       printf (UT_WARN_CRIT_RANGE);
+       printf (UT_HOST_PORT, 'P', myport);
        printf (" %s\n", "-s, --socket=STRING");
        printf ("    %s\n", _("Use the specified socket (has no effect if -H is used)"));
        printf (" -d, --database=STRING\n");
@@ -316,10 +313,13 @@ print_help (void)
 #ifdef NP_EXTRA_OPTS
        printf ("\n");
        printf ("%s\n", _("Notes:"));
-       printf (_(UT_EXTRA_OPTS_NOTES));
+       printf (UT_EXTRA_OPTS_NOTES);
+       printf ("\n");
+       printf (" %s\n", _("You must specify -p with an empty string to force an empty password,"));
+       printf (" %s\n", _("overriding any my.cnf settings."));
 #endif
 
-       printf (_(UT_SUPPORT));
+       printf (UT_SUPPORT);
 }