diff options
-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@ |