summaryrefslogtreecommitdiff
path: root/net-mgmt/net-snmp-devel/files
diff options
context:
space:
mode:
authorJun Kuriyama <kuriyama@FreeBSD.org>2002-09-17 02:17:09 +0000
committerJun Kuriyama <kuriyama@FreeBSD.org>2002-09-17 02:17:09 +0000
commit87a8145c93d467a0a7c515f4618d28a0fcbc6bf4 (patch)
tree02f5edb870afc7ad38084f37c4fbfe9912dfe123 /net-mgmt/net-snmp-devel/files
parentUpgrade to 0.11.3 (diff)
HEADS UP: After this commit, snmpd is not enabled by default.
See pkg-message for details. * Use /etc/rc.conf variables to control snmpd invocation. * Add some make variables to set default values. Requested by: many people :-)
Notes
Notes: svn path=/head/; revision=66465
Diffstat (limited to 'net-mgmt/net-snmp-devel/files')
-rw-r--r--net-mgmt/net-snmp-devel/files/snmpd.sh.sample18
1 files changed, 17 insertions, 1 deletions
diff --git a/net-mgmt/net-snmp-devel/files/snmpd.sh.sample b/net-mgmt/net-snmp-devel/files/snmpd.sh.sample
index 71f8b504ce81..a626c9b9e26e 100644
--- a/net-mgmt/net-snmp-devel/files/snmpd.sh.sample
+++ b/net-mgmt/net-snmp-devel/files/snmpd.sh.sample
@@ -1,13 +1,29 @@
#!/bin/sh
+#
+# $FreeBSD$
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
echo "$0: Cannot determine the PREFIX" >&2
exit 1
fi
+if [ -z "${source_rc_confs_defined}" ]; then
+ if [ -r /etc/defaults/rc.conf ]; then
+ . /etc/defaults/rc.conf
+ source_rc_confs
+ elif [ -r /etc/rc.conf ]; then
+ . /etc/rc.conf
+ fi
+fi
+
case "$1" in
start)
- [ -x ${PREFIX}/sbin/snmpd ] && ${PREFIX}/sbin/snmpd && echo -n ' snmpd'
+ case "${net_snmpd_enable}" in
+ [Yy][Ee][Ss])
+ echo -n ' snmpd'
+ ${net_snmpd_program:-${PREFIX}/sbin/snmpd} ${net_snmpd_flags}
+ ;;
+ esac
;;
stop)
killall snmpd && echo -n ' snmpd'