| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
# generically set up the community "testcommunity" for various snmp |
| 4 |
# version access to the agent. |
| 5 |
|
| 6 |
if [ "x$snmp_version" = "x" ]; then |
| 7 |
snmp_version="any" |
| 8 |
fi |
| 9 |
if [ "x$snmp_write_access" = "x" ]; then |
| 10 |
snmp_write_access="none" |
| 11 |
fi |
| 12 |
|
| 13 |
[ "x$SNMP_SMUX_SOCKET" = "x" ] && SNMP_SMUX_SOCKET=1.0.0.0 |
| 14 |
|
| 15 |
CONFIGAGENT [snmp] persistentdir $SNMP_TMP_PERSISTENTDIR |
| 16 |
CONFIGAGENT smuxsocket $SNMP_SMUX_SOCKET |
| 17 |
|
| 18 |
CONFIGAGENT com2sec testcommunitysec default testcommunity |
| 19 |
if [ "$SNMP_TRANSPORT_SPEC" = "udp6" -o "$SNMP_TRANSPORT_SPEC" = "tcp6" ];then |
| 20 |
CONFIGAGENT com2sec6 testcommunitysec default testcommunity |
| 21 |
fi |
| 22 |
|
| 23 |
if [ "$SNMP_TRANSPORT_SPEC" = "unix" ];then |
| 24 |
CONFIGAGENT com2secunix testcommunitysec testcommunity |
| 25 |
fi |
| 26 |
|
| 27 |
CONFIGAGENT group testcommunitygroup $snmp_version testcommunitysec |
| 28 |
CONFIGAGENT view all included .1 80 |
| 29 |
CONFIGAGENT "access testcommunitygroup '' any noauth exact all $snmp_write_access none" |