summaryrefslogtreecommitdiff
path: root/package/net-snmp/files
diff options
context:
space:
mode:
Diffstat (limited to 'package/net-snmp/files')
-rw-r--r--package/net-snmp/files/snmpd.conf14
-rw-r--r--package/net-snmp/files/snmpd.default1
-rw-r--r--package/net-snmp/files/snmpd.init27
3 files changed, 42 insertions, 0 deletions
diff --git a/package/net-snmp/files/snmpd.conf b/package/net-snmp/files/snmpd.conf
new file mode 100644
index 000000000..f6e872ab6
--- /dev/null
+++ b/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/package/net-snmp/files/snmpd.default b/package/net-snmp/files/snmpd.default
new file mode 100644
index 000000000..758c8e44f
--- /dev/null
+++ b/package/net-snmp/files/snmpd.default
@@ -0,0 +1 @@
+OPTIONS="-Lf /dev/null -p /var/run/snmpd.pid"
diff --git a/package/net-snmp/files/snmpd.init b/package/net-snmp/files/snmpd.init
new file mode 100644
index 000000000..71cf6c597
--- /dev/null
+++ b/package/net-snmp/files/snmpd.init
@@ -0,0 +1,27 @@
+#!/bin/sh
+#FWINIT 60
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ [[ $snmpd_flags = NO ]] && exit 0
+ exec sh $0 start
+ ;;
+start)
+ [ -d /var/lib/snmp ] || mkdir -p /var/lib/snmp
+ snmpd $snmpd_flags
+ ;;
+stop)
+ killall snmpd
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?