diff options
author | kuriyama <kuriyama@FreeBSD.org> | 2002-09-17 10:17:09 +0800 |
---|---|---|
committer | kuriyama <kuriyama@FreeBSD.org> | 2002-09-17 10:17:09 +0800 |
commit | 946b48dbdd2135fb62a70f5335246bf4f2b8e4a9 (patch) | |
tree | 5e7a855a1e084ed9f13db8b013ed0288ec9f3dd4 /net/net-snmp/files | |
parent | 95a10349a56b24191ae157765eb53eb3d416bbd0 (diff) | |
download | freebsd-ports-gnome-946b48dbdd2135fb62a70f5335246bf4f2b8e4a9.tar.gz freebsd-ports-gnome-946b48dbdd2135fb62a70f5335246bf4f2b8e4a9.tar.zst freebsd-ports-gnome-946b48dbdd2135fb62a70f5335246bf4f2b8e4a9.zip |
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 :-)
Diffstat (limited to 'net/net-snmp/files')
-rw-r--r-- | net/net-snmp/files/snmpd.sh.sample | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/net/net-snmp/files/snmpd.sh.sample b/net/net-snmp/files/snmpd.sh.sample index 71f8b504ce81..a626c9b9e26e 100644 --- a/net/net-snmp/files/snmpd.sh.sample +++ b/net/net-snmp/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' |