diff options
author | Nicolas Thill <nico@openwrt.org> | 2005-05-20 16:32:01 +0000 |
---|---|---|
committer | Nicolas Thill <nico@openwrt.org> | 2005-05-20 16:32:01 +0000 |
commit | 8fffd0e036f7f0408c26fd2fa7b83dd0ced0bda8 (patch) | |
tree | 923c52d11b567ccda3afb565a62c78643cb67e2b /openwrt/package/net-snmp/files | |
parent | b0d80f983aa7904300f519082950e12f564f9a56 (diff) | |
download | mtk-20170518-8fffd0e036f7f0408c26fd2fa7b83dd0ced0bda8.zip mtk-20170518-8fffd0e036f7f0408c26fd2fa7b83dd0ced0bda8.tar.gz mtk-20170518-8fffd0e036f7f0408c26fd2fa7b83dd0ced0bda8.tar.bz2 |
Add net-snmp package
SVN-Revision: 991
Diffstat (limited to 'openwrt/package/net-snmp/files')
-rw-r--r-- | openwrt/package/net-snmp/files/snmpd.conf | 14 | ||||
-rw-r--r-- | openwrt/package/net-snmp/files/snmpd.default | 1 | ||||
-rw-r--r-- | openwrt/package/net-snmp/files/snmpd.init | 25 |
3 files changed, 40 insertions, 0 deletions
diff --git a/openwrt/package/net-snmp/files/snmpd.conf b/openwrt/package/net-snmp/files/snmpd.conf new file mode 100644 index 0000000..f6e872a --- /dev/null +++ b/openwrt/package/net-snmp/files/snmpd.conf @@ -0,0 +1,14 @@ +com2sec ro default public +com2sec rw localhost private + +group public v1 ro +group public v2c ro +group public usm ro +group private v1 rw +group private v2c rw +group private usm rw + +view all included .1 + +access public "" any noauth exact all none none +access private "" any noauth exact all all all diff --git a/openwrt/package/net-snmp/files/snmpd.default b/openwrt/package/net-snmp/files/snmpd.default new file mode 100644 index 0000000..758c8e4 --- /dev/null +++ b/openwrt/package/net-snmp/files/snmpd.default @@ -0,0 +1 @@ +OPTIONS="-Lf /dev/null -p /var/run/snmpd.pid" diff --git a/openwrt/package/net-snmp/files/snmpd.init b/openwrt/package/net-snmp/files/snmpd.init new file mode 100644 index 0000000..46b4297 --- /dev/null +++ b/openwrt/package/net-snmp/files/snmpd.init @@ -0,0 +1,25 @@ +#!/bin/sh + +DEFAULT=/etc/default/snmpd +LIB_D=/var/lib/snmp +LOG_D=/var/log +RUN_D=/var/run +PID_F=$RUN_D/snmpd.pid + +[ -f $DEFAULT ] && . $DEFAULT + +case $1 in + start) + [ -d $LIB_D ] || mkdir -p $LIB_D + [ -d $LOG_D ] || mkdir -p $LOG_D + [ -d $RUN_D ] || mkdir -p $RUN_D + snmpd $OPTIONS + ;; + stop) + [ -f $PID_F ] && kill $(cat $PID_F) + ;; + *) + echo "usage: $0 (start|stop)" + exit 1 +esac +exit $? |