aboutsummaryrefslogtreecommitdiffstats
path: root/net/openbgpd/files
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/openbgpd/files
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/openbgpd/files')
-rw-r--r--net/openbgpd/files/openbgpd.in13
1 files changed, 9 insertions, 4 deletions
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"