blob: fcb46b32ed30036e625e3715f2f46f818d324cd5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
apk_add $@ net-snmp-tools
sed 's:NETWORK/24:127.0.0.0/24:; s:COMMUNITY$$:public:' \
< /etc/snmp/snmpd.conf.example >/etc/snmp/snmpd.conf
/etc/init.d/snmpd start
snmpwalk -v 2c -c public 127.0.0.1 .1.3.6.1.2
/etc/init.d/snmpd stop
i=10; while pidof snmpd; do \
[ $i -eq 0 ] && exit 1; \
$i=$((i - 1)); \
sleep 1; \
done
apk_del $@ net-snmp-tools
|