Re: pass extension, parameter passing bug
Den 13-01-2014 15:20, Dennis Lampert skrev: > But my SNMP daemon outputs the following > > ucd-snmp/pass: pass-running: /bin/bash /home/skims/test.sh -g > .1.3.6.1.4.1.8072.2.265 > > ucd-snmp/pass: pass-running: /bin/bash /home/skims/test.sh -s > .1.3.6.1.4.1.8072.2.265.1 string ucd-snmp/pass: pass-running returned: > .1.3.6.1.4.1.8072.2.265.1 > > > As you can see it does not output the string I wanted to pass. Not even that, but the output line is not complete with a newline, but it is not something that I can reproduce immediately. How exactly does your snmpd.conf entry look like, and what doesyour script do? Btw, why do you give /bin/bash explicitly? A #!/bin/bash at the top of your script should suffice /Niels -- Niels Baggesen - @home - Ã…rhus - Denmark - n...@users.sourceforge.net The purpose of computing is insight, not numbers --- R W Hamming -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
pass extension, parameter passing bug
Dear Net-SNMP developer, I am using Net-SNMP in version 5.7.2 and want to use the MIB-Specific Extension Commands and use the pass option to run an script. To pass a parameter to the script I use the snmpset command. When I use the command I receive the following message: skims@Tanger-skims:~$ snmpset -v 2c -c private localhost .1.3.6.1.4.1.8072.2.265 s "160.45.115.0/26" NET-SNMP-EXAMPLES-MIB::netSnmpExamples.265.1 = STRING: "160.45.115.0/26" But my SNMP daemon outputs the following ucd-snmp/pass: pass-running: /bin/bash /home/skims/test.sh -g .1.3.6.1.4.1.8072.2.265 ucd-snmp/pass: pass-running: /bin/bash /home/skims/test.sh -s .1.3.6.1.4.1.8072.2.265.1 string ucd-snmp/pass: pass-running returned: .1.3.6.1.4.1.8072.2.265.1 As you can see it does not output the string I wanted to pass. When I use the same command with an integer, the daemon outputs the passed integer and my script receives it. Could it be, that the current version of Net-SNMP contains a bug? Regards, Dennis Lampert -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders