From 1acb1a5dc236393b924f989b64e1e73aefb3cb45 Mon Sep 17 00:00:00 2001 From: jim-p Date: Mon, 26 Nov 2012 16:02:26 -0500 Subject: Call the direct bgpd binary to avoid a potential conflict with quagga on 2.1 (unavoidable on 1.2.x/2.0.x) --- config/openbgpd/openbgpd.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'config/openbgpd/openbgpd.inc') diff --git a/config/openbgpd/openbgpd.inc b/config/openbgpd/openbgpd.inc index 573745be..eff2855b 100644 --- a/config/openbgpd/openbgpd.inc +++ b/config/openbgpd/openbgpd.inc @@ -34,6 +34,12 @@ require_once("service-utils.inc"); define('PKG_BGPD_CONFIG_BASE', '/var/etc/openbgpd'); +$pf_version=substr(trim(file_get_contents("/etc/version")),0,3); +if ($pf_version > 2.0) + define('PKG_BGPD_BIN', '/usr/pbi/openbgpd-' . php_uname("m") . '/sbin'); +else + define('PKG_BGPD_BIN','/usr/local/sbin'); + define('PKG_BGPD_LOGIN', "_bgpd"); define('PKG_BGPD_UID', "130"); define('PKG_BGPD_GROUP', "_bgpd"); @@ -51,6 +57,7 @@ function openbgpd_install_conf() { $pkg_gecos = PKG_BGPD_GECOS; $pkg_homedir = PKG_BGPD_HOMEDIR; $pkg_shell = PKG_BGPD_SHELL; + $pkg_bin = PKG_BGPD_BIN; conf_mount_rw(); @@ -193,7 +200,7 @@ chmod u+rw,go-rw {$bgpd_config_base}/bgpd.conf NUMBGPD=`ps auxw | grep -c '[b]gpd.*parent'` if [ \${NUMBGPD} -lt 1 ] ; then - /usr/local/sbin/bgpd -f {$bgpd_config_base}/bgpd.conf + {$pkg_bin}/bgpd -f {$bgpd_config_base}/bgpd.conf fi EOF; write_rcfile(array( -- cgit v1.2.3