diff options
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2003-06-10 04:53:26 +0000 |
---|---|---|
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2003-06-10 04:53:26 +0000 |
commit | 593a1af67bc1848725cddce84d0d4517f212ffb3 (patch) | |
tree | 1bc19bebca654ca259cd9b109fef2ab557315020 | |
parent | b34669fff3d779e39a3d5c6545200ec1fd571e32 (diff) | |
download | monitoring-plugins-593a1af67bc1848725cddce84d0d4517f212ffb3.tar.gz |
add note about effect of shell quote handling to address https://sourceforge.net/tracker/index.php?func=detail&aid=661916&group_id=29880&atid=397597
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/branches/release-1.3.0@541 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r-- | plugins/urlize.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/plugins/urlize.c b/plugins/urlize.c index 8d6fc3ad..2d33a8b6 100644 --- a/plugins/urlize.c +++ b/plugins/urlize.c | |||
@@ -102,7 +102,7 @@ main (int argc, char **argv) | |||
102 | } | 102 | } |
103 | 103 | ||
104 | if (!found) { | 104 | if (!found) { |
105 | printf ("%s problem - No data recieved from host\nCMD: %s\n", argv[0], | 105 | printf ("%s problem - No data recieved from host\nCMD: %s\n</A>\n", argv[0], |
106 | cmd); | 106 | cmd); |
107 | exit (STATE_UNKNOWN); | 107 | exit (STATE_UNKNOWN); |
108 | } | 108 | } |
@@ -131,12 +131,25 @@ void | |||
131 | print_help (const char *cmd) | 131 | print_help (const char *cmd) |
132 | { | 132 | { |
133 | print_revision (progname, "$Revision$"); | 133 | print_revision (progname, "$Revision$"); |
134 | printf | 134 | printf ("\ |
135 | ("Copyright (c) 2000 Karl DeBisschop (kdebiss@alum.mit.edu)\n\n" | 135 | Copyright (c) 2000 Karl DeBisschop (kdebiss@alum.mit.edu)\n\n\ |
136 | "\nThis plugin wraps the text output of another command (plugin) in HTML\n" | 136 | \nThis plugin wraps the text output of another command (plugin) in HTML\n\ |
137 | "<A> tags, thus displaying the plugin output in as a clickable link in\n" | 137 | <A> tags, thus displaying the plugin output in as a clickable link in\n\ |
138 | "the Nagios status screen. The return status is the same as the invoked\n" | 138 | the Nagios status screen. The return status is the same as the invoked\n\ |
139 | "plugin.\n\n"); | 139 | plugin.\n\n"); |
140 | print_usage (cmd); | 140 | print_usage (cmd); |
141 | printf ("\n\ | ||
142 | Pay close attention to quoting to ensure that the shell passes the expected\n\ | ||
143 | data to the plugin. For example, in:\n\ | ||
144 | \n\ | ||
145 | urlize http://example.com/ check_http -H example.com -r 'two words'\n\ | ||
146 | \n\ | ||
147 | the shell will remove the single quotes and urlize will see:\n\ | ||
148 | \n\ | ||
149 | urlize http://example.com/ check_http -H example.com -r two words\n\ | ||
150 | \n\ | ||
151 | You probably want:\n\ | ||
152 | \n\ | ||
153 | urlize http://example.com/ \"check_http -H example.com -r 'two words'\"\n"); | ||
141 | exit (STATE_OK); | 154 | exit (STATE_OK); |
142 | } | 155 | } |