aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2014-06-04 03:50:10 +0800
committerhrs <hrs@FreeBSD.org>2014-06-04 03:50:10 +0800
commit7161f5e6ab6856d1d976b6fe8ad2ee769cda26bb (patch)
tree58cdbd26caee88556a51a074043ff48d98347f48 /net
parent0bbe6f7671d0f27a734dd5bda76f9c8fa35db991 (diff)
downloadfreebsd-ports-gnome-7161f5e6ab6856d1d976b6fe8ad2ee769cda26bb.tar.gz
freebsd-ports-gnome-7161f5e6ab6856d1d976b6fe8ad2ee769cda26bb.tar.zst
freebsd-ports-gnome-7161f5e6ab6856d1d976b6fe8ad2ee769cda26bb.zip
Make rc.d/openbgpd send signals only to the parent daemon process to fix
a race condition. Submitted by: naddy
Diffstat (limited to 'net')
-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"