diff options
author | Erlang/OTP <[email protected]> | 2009-11-20 14:54:40 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2009-11-20 14:54:40 +0000 |
commit | 84adefa331c4159d432d22840663c38f155cd4c1 (patch) | |
tree | bff9a9c66adda4df2106dfd0e5c053ab182a12bd /lib/snmp/bin/snmp-v2tov1.src | |
download | otp-84adefa331c4159d432d22840663c38f155cd4c1.tar.gz otp-84adefa331c4159d432d22840663c38f155cd4c1.tar.bz2 otp-84adefa331c4159d432d22840663c38f155cd4c1.zip |
The R13B03 release.OTP_R13B03
Diffstat (limited to 'lib/snmp/bin/snmp-v2tov1.src')
-rw-r--r-- | lib/snmp/bin/snmp-v2tov1.src | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/snmp/bin/snmp-v2tov1.src b/lib/snmp/bin/snmp-v2tov1.src new file mode 100644 index 0000000000..891487af2a --- /dev/null +++ b/lib/snmp/bin/snmp-v2tov1.src @@ -0,0 +1,32 @@ +#!/bin/sh +# +# Converts a SNMPv2 MIB to a SNMPv1 MIB +# Some kind of ad hoc algorithm is used - the +# v2 MIBs must be well-formatted. +# [email protected] 971114 + +Out=nope + +while [ $# -gt 0 ]; +do + case $1 in + -h*) + echo "Usage: snmp-v2tov1 [-o OutFile] FileName" + echo " Converts a SNMPv2 MIB to a SNMPv1 MIB" + exit;; + -o) + Out=$2 + shift; + shift;; + *) + File=$1 + shift;; + esac +done + +if [ "X$Out" = "Xnope" ] +then + Out=$File.v1 +fi + +%PERL% $ERL_TOP/lib/snmp/bin/snmp-v2tov1.pl $File | sed -f $ERL_TOP/lib/snmp/bin/snmp-v2tov1.sed > $Out |