SRCDIR = `pwd` OPENPKG = /cw RC = $(OPENPKG)/etc/rc SNMPGET = $(OPENPKG)/bin/snmpget SNMPWALK = $(OPENPKG)/bin/snmpwalk SNMPHOSTS = dv1 dv6 dv9 SNMPMIBDIR = $(SRCDIR)/snmpdx.mib:$(OPENPKG)/share/snmp/mibs SNMPMIBNAME = snmpdx restart: @for host in $(SNMPHOSTS); do \ echo "==== $$host ===="; \ ssh -t root@$$host "$(RC) snmp stop start"; \ $(SNMPGET) \ -M $(SNMPMIBDIR) -cpublic -v2c -mALL \ $$host $(SNMPMIBNAME)::swOsName; \ done query: @for host in $(SNMPHOSTS); do \ echo "==== $$host ===="; \ $(SNMPWALK) \ -M $(SNMPMIBDIR) -cpublic -v2c -mALL \ $$host $(SNMPMIBNAME); \ done