[Nagiosplug-checkins] nagiosplug/contrib check_rbl.c,1.2,1.3
Benoit Mortier
opensides at users.sourceforge.net
Wed Dec 1 16:31:05 CET 2004
- Previous message: Removal of process_argument return code check (was Re: [Nagiosplug-checkins] nagiosplug/plugins check_by_ssh.c,1.23,1.24 check_dig.c,1.28,1.29 check_disk.c,1.48,1.49 check_dns.c,1.30,1.31 check_dummy.c,1.8,1.9 check_fping.c,1.15,1.16 check_game.c,1.11,1.12 check_hpjd.c,1.21,1.22 check_http.c,1.66,1.67 check_ide-smart.c,1.5,1.6 check_ldap.c,1.17,1.18 check_load.c,1.16,1.17 check_mrtg.c,1.14,1.15 check_mrtgtraf.c,1.14,1.15 check_mysql.c,1.15,1.16 check_nagios.c,1.12,1.13 check_nt.c,1.25,1.26 check_nwstat.c,1.16,1.17 check_overcr.c,1.9,1.10 check_pgsql.c,1.18,1.19 check_ping.c,1.29,1.30 check_procs.c,1.29,1.30 check_radius.c,1.11,1.12 check_real.c,1.14,1.15 check_smtp.c,1.29,1.30 check_snmp.c,1.39,1.40 check_ssh.c,1.16,1.17 check_swap.c,1.32,1.33 check_tcp.c,1.44,1.45 check_time.c,1.14,1.15 check_udp.c,1.13,1.14 check_ups.c,1.15,1.16 check_users.c,1.11,1.12 common.h,1.13,1.14 getaddrinfo.c,1.1,1.2 getaddrinfo.h,1.1,1.2 gethostbyname.c,1.1,1.2 gethostbyname.h,1.1,1.! 2 ne!! gate.c! ,1.15,1.16 netutils.c,1.20,1.21 netutils.h,1.9,1.10 pop! en.c,1.7,1.8 urlize.c,1.12,1.13 utils.c,1.37,1.38 utils.h,1.19,1.20)
- Next message: [Nagiosplug-checkins] nagiosplug/plugins check_dns.c,1.31,1.32 check_game.c,1.12,1.13 check_http.c,1.67,1.68 check_ide-smart.c,1.6,1.7 check_load.c,1.17,1.18 check_mrtgtraf.c,1.15,1.16 check_mysql.c,1.16,1.17 check_nagios.c,1.13,1.14 check_nt.c,1.26,1.27 check_nwstat.c,1.17,1.18 check_overcr.c,1.10,1.11 check_pgsql.c,1.19,1.20 check_ping.c,1.30,1.31 check_procs.c,1.30,1.31 check_radius.c,1.12,1.13 check_real.c,1.15,1.16 check_snmp.c,1.40,1.41 check_ssh.c,1.17,1.18 check_tcp.c,1.45,1.46 check_time.c,1.15,1.16 check_udp.c,1.14,1.15 check_ups.c,1.16,1.17 negate.c,1.16,1.17 popen.c,1.8,1.9
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/nagiosplug/nagiosplug/contrib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16508/contrib
Modified Files:
check_rbl.c
Log Message:
adapted for localization
Index: check_rbl.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/contrib/check_rbl.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- check_rbl.c 13 Jan 2003 12:21:51 -0000 1.2
+++ check_rbl.c 2 Dec 2004 00:30:32 -0000 1.3
@@ -22,6 +22,9 @@
#include "string.h"
const char progname = "check_rbl";
+const char *revision = "$Revision$";
+//const char *copyright = "2000-2003";
+//const char *email = "nagiosplug-devel at lists.sourceforge.net";
int process_arguments(int, char **);
int call_getopt(int, char **);
@@ -48,7 +51,7 @@
usage("Cannot catch SIGALRM\n");
if (process_arguments(argc,argv)!=OK)
- usage("Could not parse arguments\n");
+ usage (_("check_rbl: could not parse arguments\n"));
/* reverse the octets in the IP address */
query_address_rev = reverse_ipaddr(query_address);
@@ -127,7 +130,7 @@
if (spclose(child_process)) {
result=error_set(result,STATE_WARNING);
if (!strcmp(output,""))
- strcpy(output,"nslookup returned error status");
+ strcpy(output,"nslookup returned an error status");
}
(void)time(&end_time);
@@ -144,6 +147,8 @@
return result;
}
+
+
/* reverse the ipaddr */
char *reverse_ipaddr(char *ipaddr)
{
@@ -160,6 +165,7 @@
}
+
/* process command-line arguments */
int process_arguments(int argc, char **argv)
{
@@ -189,9 +195,6 @@
-
-
-
int call_getopt(int argc, char **argv)
{
int c,i=0;
@@ -266,7 +269,9 @@
print_help();
exit(STATE_OK);
case '?': /* help */
- usage("Invalid argument\n");
+ printf (_("%s: Unknown argument: %s\n\n"), progname, optarg);
+ print_usage ();
+ exit (STATE_UNKNOWN);
}
}
return i;
@@ -274,8 +279,6 @@
-
-
int validate_arguments(void)
{
if (query_address == NULL || rbl_name == NULL)
@@ -286,8 +289,6 @@
-
-
void print_help(void)
{
print_revision(progname,"$Revision$");
@@ -317,8 +318,6 @@
-
-
void print_usage(void)
{
printf
- Previous message: Removal of process_argument return code check (was Re: [Nagiosplug-checkins] nagiosplug/plugins check_by_ssh.c,1.23,1.24 check_dig.c,1.28,1.29 check_disk.c,1.48,1.49 check_dns.c,1.30,1.31 check_dummy.c,1.8,1.9 check_fping.c,1.15,1.16 check_game.c,1.11,1.12 check_hpjd.c,1.21,1.22 check_http.c,1.66,1.67 check_ide-smart.c,1.5,1.6 check_ldap.c,1.17,1.18 check_load.c,1.16,1.17 check_mrtg.c,1.14,1.15 check_mrtgtraf.c,1.14,1.15 check_mysql.c,1.15,1.16 check_nagios.c,1.12,1.13 check_nt.c,1.25,1.26 check_nwstat.c,1.16,1.17 check_overcr.c,1.9,1.10 check_pgsql.c,1.18,1.19 check_ping.c,1.29,1.30 check_procs.c,1.29,1.30 check_radius.c,1.11,1.12 check_real.c,1.14,1.15 check_smtp.c,1.29,1.30 check_snmp.c,1.39,1.40 check_ssh.c,1.16,1.17 check_swap.c,1.32,1.33 check_tcp.c,1.44,1.45 check_time.c,1.14,1.15 check_udp.c,1.13,1.14 check_ups.c,1.15,1.16 check_users.c,1.11,1.12 common.h,1.13,1.14 getaddrinfo.c,1.1,1.2 getaddrinfo.h,1.1,1.2 gethostbyname.c,1.1,1.2 gethostbyname.h,1.1,1.! 2 ne!! gate.c! ,1.15,1.16 netutils.c,1.20,1.21 netutils.h,1.9,1.10 pop! en.c,1.7,1.8 urlize.c,1.12,1.13 utils.c,1.37,1.38 utils.h,1.19,1.20)
- Next message: [Nagiosplug-checkins] nagiosplug/plugins check_dns.c,1.31,1.32 check_game.c,1.12,1.13 check_http.c,1.67,1.68 check_ide-smart.c,1.6,1.7 check_load.c,1.17,1.18 check_mrtgtraf.c,1.15,1.16 check_mysql.c,1.16,1.17 check_nagios.c,1.13,1.14 check_nt.c,1.26,1.27 check_nwstat.c,1.17,1.18 check_overcr.c,1.10,1.11 check_pgsql.c,1.19,1.20 check_ping.c,1.30,1.31 check_procs.c,1.30,1.31 check_radius.c,1.12,1.13 check_real.c,1.15,1.16 check_snmp.c,1.40,1.41 check_ssh.c,1.17,1.18 check_tcp.c,1.45,1.46 check_time.c,1.15,1.16 check_udp.c,1.14,1.15 check_ups.c,1.16,1.17 negate.c,1.16,1.17 popen.c,1.8,1.9
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Commits
mailing list