Difference between revisions of "Template:FAQ:Applications 14"
From Net-SNMP Wiki
					
										
					
					 (5.4 release synchronisation)  | 
				|||
| Line 1: | Line 1: | ||
| + | <!-- NB:  | ||
| + |    There is a mismatch between the template numbering  | ||
| + |    for this entry, and the FAQ entries that refer to it.  | ||
| + |    This follows a re-ordering of the entries in the  | ||
| + |    Applications section.  | ||
| + |  -->  | ||
This is a different problem.  What's happening here is that the  | This is a different problem.  What's happening here is that the  | ||
| − | routine that parses the arguments to the 'snmpset' command is seeing  | + | routine that parses the arguments to the <CODE>'snmpset'</CODE> command is seeing  | 
| − | the '-' of the new value, and treating it as a command-line option.  | + | the <CODE>'-'</CODE> of the new value, and treating it as a command-line option.  | 
| − | This normally generates an error (since digits   | + | This normally generates an error (since digits typically aren't valid  | 
command line option).  | command line option).  | ||
The easiest way to solve this is include the "end-of-option"  | The easiest way to solve this is include the "end-of-option"  | ||
| − | indicator '--' in the command line, somewhere before the new value    | + | indicator <CODE>'--'</CODE> in the command line, somewhere before the new value    | 
(but after all of the options, obviously).  For example:  | (but after all of the options, obviously).  For example:  | ||
| Line 12: | Line 18: | ||
(This will also fail, since -1 isn't an acceptable value for this  | (This will also fail, since -1 isn't an acceptable value for this  | ||
| − | object, but   | + | particular object, but that's not the point here!)  | 
| − | + | ||
Revision as of 16:12, 28 December 2006
This is a different problem.  What's happening here is that the
routine that parses the arguments to the 'snmpset' command is seeing
the '-' of the new value, and treating it as a command-line option.
This normally generates an error (since digits typically aren't valid
command line option).
The easiest way to solve this is include the "end-of-option"
indicator '--' in the command line, somewhere before the new value 
(but after all of the options, obviously).  For example:
snmpset -v 2c -c public localhost -- versionRestartAgent.0 i -1
(This will also fail, since -1 isn't an acceptable value for this particular object, but that's not the point here!)