summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2015-09-26 21:28:50 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2015-09-26 21:28:50 (GMT)
commite6e8ba0bb7f238ed622f62d67413f25992064ec9 (patch) (side-by-side diff)
tree7de987a1a3c4bd20d0e341ed01beb702987c57fb
parent2db4e4b15b49e105e2f6079ac23c721fd362217d (diff)
downloadnetsnmp-sendmail-e6e8ba0bb7f238ed622f62d67413f25992064ec9.tar.gz
netsnmp-sendmail-e6e8ba0bb7f238ed622f62d67413f25992064ec9.tar.bz2
Register numeric OID.
* Sendmail.mib2c: New variable $rootoid; Pass it to registerAgent;
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Sendmail.mib2c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Sendmail.mib2c b/Sendmail.mib2c
index bbf0269..db43f43 100644
--- a/Sendmail.mib2c
+++ b/Sendmail.mib2c
@@ -34,6 +34,8 @@ $vars{agentname} = $vars{name};
$vars{agentname} =~ s/\.pm//;
$vars{tempfile} = "$vars{agentname}.tmp";
+my $oid = new NetSNMP::OID($vars{'oid'});
+$vars{rootoid} = '.' . join('.', $oid->to_array());
0;
@endperl@
@@ -94,7 +96,7 @@ $vars{tempfile} = "$vars{agentname}.tmp";
## The $oid variable comes from mib2c as the last non option arg
# Register the top oid with the agent
my $@agent = new NetSNMP::agent('Name' => '$agentname');
-@printf "registerAgent(%sagent, '$oid', %soidtable);",$,$@
+registerAgent($@agent, '$rootoid', $@oidtable);
@close ${tempfile}@
@startperl@

Return to:

Send suggestions and report system problems to the System administrator.