aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/get_mibs.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/get_mibs.sh b/tools/get_mibs.sh
new file mode 100755
index 0000000..cab9fa3
--- /dev/null
+++ b/tools/get_mibs.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+MIBS="SNMPv2 ENTITY IF LLDP IP IP-FORWARD"
+ORIGPWD=$PWD
+TMP=$(mktemp -d)
+set -x
+set -e
+cd $TMP
+wget ftp://ftp.cisco.com/pub/mibs/v2/v2.tar.gz
+tar xvzf v2.tar.gz --strip-components=2
+mkdir -p mibs
+
+for a in $MIBS; do
+ cp v2/$a-MIB.my mibs/
+done
+mv mibs ${ORIGPWD}/
+cd ${ORIGPWD}
+rm -rf ${TMP}