diff options
author | nico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-05-20 16:32:01 +0000 |
---|---|---|
committer | nico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-05-20 16:32:01 +0000 |
commit | 3b5357f927c0fe18037b21355160b2d6d7ce8c24 (patch) | |
tree | 923c52d11b567ccda3afb565a62c78643cb67e2b /openwrt/package/net-snmp/files | |
parent | c7b955b36570ce6cfad33ab7e4fb67d68f91926f (diff) |
Add net-snmp package
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@991 3c298f89-4303-0410-b956-a3cf2f4a3e73
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 000000000..f6e872ab6 --- /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 000000000..758c8e44f --- /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 000000000..46b429760 --- /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 $? |