aboutsummaryrefslogtreecommitdiffstats
path: root/config/openbgpd
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-11-26 16:02:26 -0500
committerjim-p <jimp@pfsense.org>2012-11-26 16:02:26 -0500
commit1acb1a5dc236393b924f989b64e1e73aefb3cb45 (patch)
treee81daa9a6995d63b590ed91dffe7163f4ca10c91 /config/openbgpd
parent61560da14127557036e52d0e5c280a372627c130 (diff)
downloadpfsense-packages-1acb1a5dc236393b924f989b64e1e73aefb3cb45.tar.gz
pfsense-packages-1acb1a5dc236393b924f989b64e1e73aefb3cb45.tar.bz2
pfsense-packages-1acb1a5dc236393b924f989b64e1e73aefb3cb45.zip
Call the direct bgpd binary to avoid a potential conflict with quagga on 2.1 (unavoidable on 1.2.x/2.0.x)
Diffstat (limited to 'config/openbgpd')
-rw-r--r--config/openbgpd/openbgpd.inc9
1 files changed, 8 insertions, 1 deletions
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(