diff options
Diffstat (limited to 'net-mgmt/net-snmp53/files/snmpd.sh.in')
-rw-r--r-- | net-mgmt/net-snmp53/files/snmpd.sh.in | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/net-mgmt/net-snmp53/files/snmpd.sh.in b/net-mgmt/net-snmp53/files/snmpd.sh.in deleted file mode 100644 index 09db428eb9b2..000000000000 --- a/net-mgmt/net-snmp53/files/snmpd.sh.in +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: /tmp/pcvs/ports/net-mgmt/net-snmp53/files/Attic/snmpd.sh.in,v 1.7 2007-10-27 07:20:34 kuriyama Exp $ -# -# PROVIDE: snmpd -# REQUIRE: DAEMON -# -# Add the following line to /etc/rc.conf to enable snmpd: -# -# snmpd_enable="YES" -# - -snmpd_enable=${snmpd_enable-"NO"} -snmpd_flags=${snmpd_flags-""} -snmpd_pidfile=${snmpd_pidfile-"/var/run/snmpd.pid"} -snmpd_conffile=${snmpd_conffile-""} -snmpd_flush_cache=${snmpd_flush_cache-"NO"} - -. %%RC_SUBR%% - -load_rc_config net_snmpd - -if [ ! -z "$net_snmpd_enable" ]; then - echo "Warning: \$net_snmpd_enable is obsoleted." - echo " Use \$snmpd_enable instead." - snmpd_enable="$net_snmpd_enable" - [ ! -z "$net_snmpd_flags" ] && snmpd_flags="$net_snmpd_flags" -fi - -name=snmpd -rcvar=`set_rcvar` - -command=%%PREFIX%%/sbin/${name} -pidfile=${snmpd_pidfile} -start_precmd=snmpd_precmd - -load_rc_config ${name} - -snmpd_precmd () { - if checkyesno snmpd_flush_cache; then - rm -vf /var/net-snmp/.snmp-exec-cache - fi -} - -case "${snmpd_flags}" in -*-p\ *) - echo "Warning: \$snmpd_flags includes -p option." \ - "Please use \$snmpd_pidfile instead." - ;; -*) - snmpd_flags="-p ${snmpd_pidfile} ${snmpd_flags}" - ;; -esac - -for conffile in ${snmpd_conffile}; do - if [ ! -z ${conffile} -a -f ${conffile} ]; then - if [ -z ${snmpd_conffile_set} ]; then - snmpd_conffile_set="${conffile}" - else - snmpd_conffile_set="${snmpd_conffile_set},${conffile}" - fi - else - echo "snmpd configuration file $conffile not set or not found." - exit 1 - fi -done - -case "${snmpd_flags}" in -*-c\ *) - echo "Warning: \$snmpd_flags includes -c option." \ - "Please use \$snmpd_conffile instead." - ;; -*) - if [ ! -z "${snmpd_conffile_set}" ]; then - snmpd_flags="-c ${snmpd_conffile_set} ${snmpd_flags}" - fi - ;; -esac - -run_rc_command "$1" |