aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/net-snmp-devel
diff options
context:
space:
mode:
authorNorikatsu Shigemura <nork@FreeBSD.org>2006-09-23 11:31:09 +0000
committerNorikatsu Shigemura <nork@FreeBSD.org>2006-09-23 11:31:09 +0000
commitf26153d6d827bb0012367698951f9e5fbaf7400c (patch)
treebd8a4cfc938c56ab0aabbbf063347f13d53907fb /net-mgmt/net-snmp-devel
parent645816b394f1abde95c61b7f6503d172e6933d63 (diff)
downloadports-f26153d6d827bb0012367698951f9e5fbaf7400c.tar.gz
ports-f26153d6d827bb0012367698951f9e5fbaf7400c.zip
Notes
Diffstat (limited to 'net-mgmt/net-snmp-devel')
-rw-r--r--net-mgmt/net-snmp-devel/Makefile2
-rw-r--r--net-mgmt/net-snmp-devel/files/snmpd.sh.in31
2 files changed, 29 insertions, 4 deletions
diff --git a/net-mgmt/net-snmp-devel/Makefile b/net-mgmt/net-snmp-devel/Makefile
index 9c859d8bef59..49814d88b016 100644
--- a/net-mgmt/net-snmp-devel/Makefile
+++ b/net-mgmt/net-snmp-devel/Makefile
@@ -7,7 +7,7 @@
PORTNAME= snmp
PORTVERSION= 5.2.3
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net-mgmt ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= net-snmp
diff --git a/net-mgmt/net-snmp-devel/files/snmpd.sh.in b/net-mgmt/net-snmp-devel/files/snmpd.sh.in
index 602a0b28bb50..11648059a77d 100644
--- a/net-mgmt/net-snmp-devel/files/snmpd.sh.in
+++ b/net-mgmt/net-snmp-devel/files/snmpd.sh.in
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $FreeBSD: /tmp/pcvs/ports/net-mgmt/net-snmp-devel/files/Attic/snmpd.sh.in,v 1.2 2006-07-19 16:18:40 dougb Exp $
+# $FreeBSD: /tmp/pcvs/ports/net-mgmt/net-snmp-devel/files/Attic/snmpd.sh.in,v 1.3 2006-09-23 11:31:09 nork Exp $
#
# PROVIDE: snmpd
# REQUIRE: DAEMON
@@ -11,7 +11,9 @@
#
snmpd_enable=${snmpd_enable-"NO"}
-snmpd_flags=${snmpd_flags-"-p /var/run/snmpd.pid"}
+snmpd_flags=${snmpd_flags-""}
+snmpd_pidfile=${snmpd_pidfile-"/var/run/snmpd.pid"}
+snmpd_conffile=${snmpd_conffile-""}
. %%RC_SUBR%%
@@ -28,8 +30,31 @@ name=snmpd
rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/${name}
-pidfile=/var/run/${name}.pid
+pidfile=${snmpd_pidfile}
sig_stop=KILL
load_rc_config ${name}
+
+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
+
+case "${snmpd_flags}" in
+*-c\ *)
+ echo "Warning: \$snmpd_flags includes -c option." \
+ "Please use \$snmpd_conffile instead."
+ ;;
+*)
+ if [ ! -z ${snmpd_conffile} -a -f ${snmpd_conffile} ]; then
+ snmpd_flags="-c ${snmpd_conffile} ${snmpd_flags}"
+ fi
+ ;;
+esac
+
run_rc_command "$1"