summaryrefslogtreecommitdiffstats
path: root/source/n
diff options
context:
space:
mode:
Diffstat (limited to 'source/n')
-rw-r--r--source/n/net-snmp/doinst.sh1
-rwxr-xr-xsource/n/net-snmp/net-snmp.SlackBuild8
-rw-r--r--source/n/net-snmp/rc.snmpd7
-rw-r--r--source/n/net-snmp/snmpd.default2
4 files changed, 13 insertions, 5 deletions
diff --git a/source/n/net-snmp/doinst.sh b/source/n/net-snmp/doinst.sh
index 4f1e48303..db1cdda69 100644
--- a/source/n/net-snmp/doinst.sh
+++ b/source/n/net-snmp/doinst.sh
@@ -20,4 +20,5 @@ fi
config etc/snmp/snmpd.conf.new
config etc/rc.d/rc.snmpd.new
+config etc/default/snmpd.new
diff --git a/source/n/net-snmp/net-snmp.SlackBuild b/source/n/net-snmp/net-snmp.SlackBuild
index 3431458bd..55e7147eb 100755
--- a/source/n/net-snmp/net-snmp.SlackBuild
+++ b/source/n/net-snmp/net-snmp.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2014, 2018, 2020 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2014, 2018, 2020, 2021 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=net-snmp
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-4}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -133,6 +133,10 @@ zcat $CWD/snmpd.conf.gz > $PKG/etc/snmp/snmpd.conf.new
mkdir -p $PKG/etc/rc.d
cat $CWD/rc.snmpd > $PKG/etc/rc.d/rc.snmpd.new
+# Install default options file for snmpd:
+mkdir -p $PKG/etc/default
+cat $CWD/snmpd.default > $PKG/etc/default/snmpd.new
+
# Strip binaries:
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
diff --git a/source/n/net-snmp/rc.snmpd b/source/n/net-snmp/rc.snmpd
index cd52366c6..ae847e68b 100644
--- a/source/n/net-snmp/rc.snmpd
+++ b/source/n/net-snmp/rc.snmpd
@@ -3,13 +3,14 @@
# rc.snmpd This shell script takes care of starting and stopping
# the net-snmp SNMP daemon
-OPTIONS="-A -p /var/run/snmpd -a"
+[ -r /etc/default/snmpd ] && . /etc/default/snmpd
+SNMPD_OPTIONS=${SNMPD_OPTIONS:-"-A -p /var/run/snmpd -a"}
start() {
if [ -x /usr/sbin/snmpd -a -f /etc/snmp/snmpd.conf ]; then
echo -n "Starting snmpd: "
- /usr/sbin/snmpd $OPTIONS -c /etc/snmp/snmpd.conf
- echo " /usr/sbin/snmpd $OPTIONS -c /etc/snmp/snmpd.conf"
+ /usr/sbin/snmpd $SNMPD_OPTIONS -c /etc/snmp/snmpd.conf
+ echo " /usr/sbin/snmpd $SNMPD_OPTIONS -c /etc/snmp/snmpd.conf"
fi
}
diff --git a/source/n/net-snmp/snmpd.default b/source/n/net-snmp/snmpd.default
new file mode 100644
index 000000000..a7db0a292
--- /dev/null
+++ b/source/n/net-snmp/snmpd.default
@@ -0,0 +1,2 @@
+# Options to use when running snmpd:
+SNMPD_OPTIONS="-A -p /var/run/snmpd -a"