aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-12-02 09:48:51 -0200
committerRenato Botelho <garga@FreeBSD.org>2014-12-02 09:48:51 -0200
commit00ad4092959492c667261b1d54d6cc0b059cbdf9 (patch)
tree7521121ed12f0887df3cc2a25bf4438088c3c34b
parentfd63b28dc38d26cc59552f11e3f1109b52403bff (diff)
downloadpfsense-packages-00ad4092959492c667261b1d54d6cc0b059cbdf9.tar.gz
pfsense-packages-00ad4092959492c667261b1d54d6cc0b059cbdf9.tar.bz2
pfsense-packages-00ad4092959492c667261b1d54d6cc0b059cbdf9.zip
Set PATH to make possible for varnish binaries to find cc, also, avoid cc to be symlinked to pbiopt file. Bump package version
-rw-r--r--config/varnish3/varnish.inc9
-rw-r--r--pkg_config.10.xml2
-rw-r--r--pkg_config.8.xml2
-rw-r--r--pkg_config.8.xml.amd642
4 files changed, 9 insertions, 6 deletions
diff --git a/config/varnish3/varnish.inc b/config/varnish3/varnish.inc
index 730bf5ab..50b37990 100644
--- a/config/varnish3/varnish.inc
+++ b/config/varnish3/varnish.inc
@@ -140,7 +140,8 @@ function varnish_check_config(){
if (!isset($config['installedpackages']['varnishsettings']['config'][0]['enablevarnish']))
return;
- exec(VARNISH_LOCALBASE."/bin/varnishd -C -f ".VARNISH_CONFFILE." 2>&1",$output,$return);
+ $path = '/usr/bin/env PATH=' . VARNISH_LOCALBASE . '/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin';
+ exec($path . " " . VARNISH_LOCALBASE."/bin/varnishd -C -f ".VARNISH_CONFFILE." 2>&1",$output,$return);
if ($return == 0){
if (isset($_REQUEST['apply'])){
varnish_start(true);
@@ -309,6 +310,7 @@ function create_varnish_rcd_file() {
}
$fd = fopen("/usr/local/etc/rc.d/varnish.sh", "w");
$conf_file=VARNISH_CONFFILE;
+ $bin_path=VARNISH_LOCALBASE . '/bin';
$rc_file = <<<EOF
#!/bin/sh
mkdir -p /var/varnish
@@ -319,8 +321,7 @@ sysctl kern.ipc.somaxconn=16384
sysctl kern.maxfiles=131072
sysctl kern.maxfilesperproc=104856
sysctl kern.threads.max_threads_per_proc=4096
-/usr/bin/env \
-PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
+export PATH={$bin_path}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
/usr/local/bin/php -q -d auto_prepend_file=config.inc <<ENDOFF
<?php
require_once("globals.inc");
@@ -744,6 +745,8 @@ EOF;
$cc_file=VARNISH_LOCALBASE."/bin/cc";
foreach (glob(VARNISH_LOCALBASE."/bin/gcc*") as $bin_file) {
+ if (strpos($bin_file, '.pbiopt') != FALSE)
+ continue;
$gcc_file=$bin_file;
}
if (!file_exists($cc_file) && file_exists($gcc_file)){
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index dc62ec96..24a14f1a 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -568,7 +568,7 @@
<website>http://varnish-cache.org</website>
<pkginfolink>https://doc.pfsense.org/index.php/Varnish_package</pkginfolink>
<category>Services</category>
- <version>3.0.5_3 pkg v.0.2.3</version>
+ <version>3.0.5_3 pkg v.0.2.4</version>
<status>RC</status>
<required_version>2.2</required_version>
<config_file>https://packages.pfsense.org/packages/config/varnish3/varnish_backends.xml</config_file>
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index f4722412..8d2661fa 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -728,7 +728,7 @@
<website>http://varnish-cache.org</website>
<pkginfolink>https://doc.pfsense.org/index.php/Varnish_package</pkginfolink>
<category>Services</category>
- <version>3.0.4 pkg v.0.2.3</version>
+ <version>3.0.4 pkg v.0.2.4</version>
<status>RC</status>
<required_version>2.0</required_version>
<config_file>https://packages.pfsense.org/packages/config/varnish3/varnish_backends.xml</config_file>
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index 86dda795..16dcd89e 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -715,7 +715,7 @@
<website>http://varnish-cache.org</website>
<pkginfolink>https://doc.pfsense.org/index.php/Varnish_package</pkginfolink>
<category>Services</category>
- <version>3.0.4 pkg v.0.2.3</version>
+ <version>3.0.4 pkg v.0.2.4</version>
<status>RC</status>
<required_version>2.0</required_version>
<config_file>https://packages.pfsense.org/packages/config/varnish3/varnish_backends.xml</config_file>