Code

Update libtool
[nagiosplug.git] / plugins / check_load.c
index f4faa31b6f512a51ee4e292c5bdf2fc70cc29b9c..1bdb06aa2c0c98f39b3bfa846bd01ea3a5a42962 100644 (file)
@@ -5,8 +5,6 @@
 * License: GPL
 * Copyright (c) 1999-2007 Nagios Plugins Development Team
 * 
-* Last Modified: $Date$
-* 
 * Description:
 * 
 * This file contains the check_load plugin
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
-* $Id$
 * 
 *****************************************************************************/
 
 const char *progname = "check_load";
-const char *revision = "$Revision$";
 const char *copyright = "1999-2007";
 const char *email = "nagiosplug-devel@lists.sourceforge.net";
 
@@ -119,6 +115,9 @@ main (int argc, char **argv)
        textdomain (PACKAGE);
        setlocale(LC_NUMERIC, "POSIX");
 
+       /* Parse extra opts if any */
+       argv = np_extra_opts (&argc, argv, progname);
+
        if (process_arguments (argc, argv) == ERROR)
                usage4 (_("Could not parse arguments"));
 
@@ -242,7 +241,7 @@ process_arguments (int argc, char **argv)
                        take_into_account_cpus = 1;
                        break;
                case 'V':                                                                       /* version */
-                       print_revision (progname, revision);
+                       print_revision (progname, NP_VERSION);
                        exit (STATE_OK);
                case 'h':                                                                       /* help */
                        print_help ();
@@ -295,7 +294,7 @@ validate_arguments (void)
 void
 print_help (void)
 {
-       print_revision (progname, revision);
+       print_revision (progname, NP_VERSION);
 
        printf ("Copyright (c) 1999 Felipe Gustavo de Almeida <galmeida@linux.ime.usp.br>\n");
        printf (COPYRIGHT, copyright, email);
@@ -306,7 +305,8 @@ print_help (void)
 
        print_usage ();
 
-       printf (_(UT_HELP_VRSN));
+       printf (UT_HELP_VRSN);
+       printf (UT_EXTRA_OPTS);
 
        printf (" %s\n", "-w, --warning=WLOAD1,WLOAD5,WLOAD15");
   printf ("    %s\n", _("Exit with WARNING status if load average exceeds WLOADn"));
@@ -316,12 +316,12 @@ print_help (void)
   printf (" %s\n", "-r, --percpu");
   printf ("    %s\n", _("Divide the load averages by the number of CPUs (when possible)"));
 
-       printf (_(UT_SUPPORT));
+       printf (UT_SUPPORT);
 }
 
 void
 print_usage (void)
 {
-  printf (_("Usage:"));
+  printf ("%s\n", _("Usage:"));
        printf ("%s [-r] -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15\n", progname);
 }