5 HEADER AgentX SET support
7 SKIPIFNOT USING_AGENTX_MODULE
8 SKIPIFNOT USING_MIBII_SYSTEM_MIB_MODULE
14 # standard V3 configuration for initial user
17 # Start the agent without initializing the system mib.
18 ORIG_AGENT_FLAGS="$AGENT_FLAGS -x $SNMP_TMPDIR/agentx_socket"
19 AGENT_FLAGS="$ORIG_AGENT_FLAGS -I -system_mib -DAgentX"
22 # test to see that the current agent doesn't support the system mib
23 CAPTURE "snmpget -On -t 3 $SNMP_FLAGS -v 3 -a MD5 -A initial_test_pass_auth -l anp -u initial udp:localhost:$SNMP_SNMPD_PORT .1.3.6.1.2.1.1.4.0"
25 CHECK ".1.3.6.1.2.1.1.4.0 = No Such Object"
27 if test "$snmp_last_test_result" = 1; then
28 # test the AgentX subagent by first running it...
30 SNMP_SNMPD_PID_FILE_ORIG=$SNMP_SNMPD_PID_FILE
31 SNMP_SNMPD_LOG_FILE_ORIG=$SNMP_SNMPD_LOG_FILE
32 SNMP_SNMPD_PID_FILE=$SNMP_SNMPD_PID_FILE.num2
33 SNMP_SNMPD_LOG_FILE=$SNMP_SNMPD_LOG_FILE.num2
34 AGENT_FLAGS="$ORIG_AGENT_FLAGS -X -I system_mib"
35 SNMP_CONFIG_FILE="$SNMP_TMPDIR/bogus.conf"
36 echo "psyscontact testcontact" >> $SNMP_CONFIG_FILE
39 # test to see that the agent now supports the system mib
40 CAPTURE "snmpget -On $SNMP_FLAGS -t 5 -v 3 -a MD5 -A initial_test_pass_auth -l anp -u initial udp:localhost:$SNMP_SNMPD_PORT sysContact.0"
42 CHECK ".1.3.6.1.2.1.1.4.0 = STRING: testcontact"
44 if test "$snmp_last_test_result" = 1; then
46 # test to see that the agent now supports setting the system mib
47 CAPTURE "snmpset -On $SNMP_FLAGS -t 5 -v 3 -a MD5 -A initial_test_pass_auth -l anp -u initial udp:localhost:$SNMP_SNMPD_PORT sysContact.0 s newtestcontact"
49 CHECK ".1.3.6.1.2.1.1.4.0 = STRING: newtestcontact"
51 if test "$snmp_last_test_result" = 1; then
53 # test to see that the agent now supports the system mib
54 CAPTURE "snmpget -On $SNMP_FLAGS -t 5 -v 3 -a MD5 -A initial_test_pass_auth -l anp -u initial udp:localhost:$SNMP_SNMPD_PORT sysContact.0"
56 CHECK ".1.3.6.1.2.1.1.4.0 = STRING: newtestcontact"
63 SNMP_SNMPD_PID_FILE=$SNMP_SNMPD_PID_FILE_ORIG
64 SNMP_SNMPD_LOG_FILE=$SNMP_SNMPD_LOG_FILE_ORIG
67 # stop the master agent