aboutsummaryrefslogtreecommitdiff
path: root/net/openbgpd
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2014-06-03 19:50:10 +0000
committerHiroki Sato <hrs@FreeBSD.org>2014-06-03 19:50:10 +0000
commit4b5750cc9441326b2a404d0efd0c0d1ebd0ce35d (patch)
tree58cdbd26caee88556a51a074043ff48d98347f48 /net/openbgpd
parent3104b1135385279627c62db4ddb42101a9d921d5 (diff)
Make rc.d/openbgpd send signals only to the parent daemon process to fix
a race condition. Submitted by: naddy
Notes
Notes: svn path=/head/; revision=356399
Diffstat (limited to 'net/openbgpd')
-rw-r--r--net/openbgpd/Makefile2
-rw-r--r--net/openbgpd/files/openbgpd.in13
2 files changed, 10 insertions, 5 deletions
diff --git a/net/openbgpd/Makefile b/net/openbgpd/Makefile
index 2452c4c8eb71..f8ee3553b32e 100644
--- a/net/openbgpd/Makefile
+++ b/net/openbgpd/Makefile
@@ -2,7 +2,7 @@
PORTNAME= openbgpd
PORTVERSION= 5.2.20121209
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_OPENBSD}
MASTER_SITE_SUBDIR= OpenBGPD
diff --git a/net/openbgpd/files/openbgpd.in b/net/openbgpd/files/openbgpd.in
index a2d3d7e9316e..cddf6528f2bb 100644
--- a/net/openbgpd/files/openbgpd.in
+++ b/net/openbgpd/files/openbgpd.in
@@ -17,14 +17,19 @@
. /etc/rc.subr
-name="openbgpd"
+name=openbgpd
rcvar=openbgpd_enable
-extra_commands="reload"
+extra_commands=reload
command="%%PREFIX%%/sbin/bgpd"
required_files="%%PREFIX%%/etc/bgpd.conf"
-load_rc_config "$name"
-: ${openbgpd_enable="NO"}
+: ${openbgpd_enable=NO}
+check_process()
+{
+ /bin/pgrep -f 'bgpd: parent.*'
+}
+
+load_rc_config $name
run_rc_command "$1"