Robert Story wrote:
>I missed the beginning of this thread. What platform is it not working on?
>
That was the beginning of the thread. This is on RedHat Enterprise WS r3.
>I ran your program (with the minor change of /tmp/sig -> echo testing), with
>the following (expected) results:
>
Thanks for responding, anad sorry I wasn't clear.
The sample code I included works as expected for me as well.
I included it to disprove my theory that it had something to do with the
execv.
To reproduce the behaviour I am seeing:
# cat /tmp/repro:
#!/bin/bash
ARGS="-v3 -unamemine -lauthNoPriv -Anameminepw localhost:161 "
echo ARGS=$ARGS
export SNMPCONFPATH=/tmp/priv/snmp:/tmp/priv
#
/usr/local/sbin/snmpd -p /tmp/pid
cp /tmp/pid /tmp/pid.orig
snmpset ${ARGS} versionRestartAgent.0 i 1
sleep 10
if [ "`diff /tmp/pid.orig /tmp/pid`" == "" ] ; then echo "no restart"; fi
cp /tmp/pid /tmp/pid.second
snmpset ${ARGS} versionRestartAgent.0 i 1
sleep 10
if [ "`diff /tmp/pid.second /tmp/pid`" == "" ] ; then echo "no restart"; fi
# /tmp/repro
ARGS=-v3 -unamemine -lauthNoPriv -Anameminepw localhost:161
Cannot find module (NET-SNMP-EXTEND-MIB): At line 0 in (none)
UCD-SNMP-MIB::versionRestartAgent.0 = INTEGER: 1
Cannot find module (NET-SNMP-EXTEND-MIB): At line 0 in (none)
UCD-SNMP-MIB::versionRestartAgent.0 = INTEGER: 1
no restart
# cat /tmp/priv/snmp/snmpd.conf
view allvw included .1
group local usm namemine
access local "" usm authNoPriv exact allvw
allvw allvw
# cat /tmp/priv/snmpd.conf
#
# net-snmp (or ucd-snmp) persistent data file.
#
############################################################################
# STOP STOP STOP STOP STOP STOP STOP STOP STOP
#
# **** DO NOT EDIT THIS FILE ****
#
# STOP STOP STOP STOP STOP STOP STOP STOP STOP
############################################################################
#
# DO NOT STORE CONFIGURATION ENTRIES HERE.
# Please save normal configuration tokens for snmpd in
SNMPCONFPATH/snmpd.conf.
# Only "createUser" tokens should be placed here by snmpd administrators.
# (Did I mention: do not edit this file?)
#
...
usmUser 1 3 0x8000...
vacmAccess 1 3 3 3 1 0x...
setserialno 2118920927
engineBoots 7
oldEngineID 0x...
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders