diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2015-09-27 00:28:50 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2015-09-27 00:28:50 +0300 |
commit | e6e8ba0bb7f238ed622f62d67413f25992064ec9 (patch) | |
tree | 7de987a1a3c4bd20d0e341ed01beb702987c57fb | |
parent | 2db4e4b15b49e105e2f6079ac23c721fd362217d (diff) | |
download | netsnmp-sendmail-e6e8ba0bb7f238ed622f62d67413f25992064ec9.tar.gz netsnmp-sendmail-e6e8ba0bb7f238ed622f62d67413f25992064ec9.tar.bz2 |
Register numeric OID.
* Sendmail.mib2c: New variable $rootoid; Pass it to registerAgent;
-rw-r--r-- | Sendmail.mib2c | 4 |
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@ |