diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c
index 46dd044d11ff5f204252c449cf0e8c89da11677f..a21e2f524cbbbb33c63d39f4cd75e96034a9857a 100644 (file)
--- a/plugins/check_ssh.c
+++ b/plugins/check_ssh.c
******************************************************************************/
-#include "common.h"
-#include "netutils.h"
-#include "utils.h"
-
const char *progname = "check_ssh";
const char *revision = "$Revision$";
-const char *copyright = "2000-2003";
+const char *copyright = "2000-2004";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
+#include "common.h"
+#include "netutils.h"
+#include "utils.h"
+
#ifndef MSG_DONTWAIT
#define MSG_DONTWAIT 0
#endif
int
main (int argc, char **argv)
{
- int result;
+ int result = STATE_UNKNOWN;
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- if (process_arguments (argc, argv) != OK)
- usage (_("check_ssh: could not parse arguments\n"));
+ if (process_arguments (argc, argv) != TRUE)
+ usage4 (_("Could not parse arguments"));
/* initialize alarm signal handling */
signal (SIGALRM, socket_timeout_alarm_handler);
+
alarm (socket_timeout);
/* ssh_connect exits if error is found */
void
print_usage (void)
{
- printf (_("\
+ printf ("\
Usage: %s [-46] [-t <timeout>] [-r <remote version>] [-p <port>] <host>\n"), progname);
- printf (_(UT_HLP_VRS), progname, progname);
+
+ printf (UT_HLP_VRS, progname, progname);
}
-/* end of check_ssh.c */