summaryrefslogtreecommitdiffstats
path: root/etc/inc/shaper.inc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-12-28 09:41:47 +0000
committerErmal Luçi <eri@pfsense.org>2009-12-28 09:42:23 +0000
commit6955830f96ee6f3912a89e271eb59e501dfe3514 (patch)
treef1f6cbf3f4e76be76594a04ee0f90a937f49282d /etc/inc/shaper.inc
parent39618326e0ddd3d79f2596b6a11d9bc09da6ded0 (diff)
downloadpfsense-6955830f96ee6f3912a89e271eb59e501dfe3514.zip
pfsense-6955830f96ee6f3912a89e271eb59e501dfe3514.tar.gz
Replace some occurrence of /tmp with the propper global variable in attempt to minimize the search for what changes /tmp permissions.
Diffstat (limited to 'etc/inc/shaper.inc')
-rw-r--r--etc/inc/shaper.inc12
1 files changed, 6 insertions, 6 deletions
diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc
index ac492c5..ce314c3 100644
--- a/etc/inc/shaper.inc
+++ b/etc/inc/shaper.inc
@@ -3550,7 +3550,7 @@ function read_layer7_config() {
}
function generate_layer7_files() {
- global $layer7_rules_list;
+ global $layer7_rules_list, $g;
read_layer7_config();
@@ -3558,13 +3558,13 @@ function generate_layer7_files() {
if (!is_module_loaded("ipdivert.ko"))
mwexec("/sbin/kldload ipdivert.ko");
- mwexec("rm -f /tmp/*.l7");
+ mwexec("rm -f {$g['tmp_path']}/*.l7");
}
foreach($layer7_rules_list as $l7rules) {
if($l7rules->GetREnabled()) {
$filename = $l7rules->GetRName() . ".l7";
- $path = "/tmp/" . $filename;
+ $path = "{$g['tmp_path']}/" . $filename;
$rules = $l7rules->build_l7_rules();
@@ -3576,7 +3576,7 @@ function generate_layer7_files() {
}
function layer7_start_l7daemon() {
- global $layer7_rules_list;
+ global $layer7_rules_list, $g;
/*
* XXX: ermal - Needed ?!
@@ -3586,7 +3586,7 @@ function layer7_start_l7daemon() {
foreach($layer7_rules_list as $l7rules) {
if($l7rules->GetREnabled()) {
$filename = $l7rules->GetRName() . ".l7";
- $path = "/tmp/" . $filename;
+ $path = "{$g['tmp_path']}/" . $filename;
unset($l7pid);
/* Only reread the configuration rather than restart to avoid loosing information. */
@@ -3924,4 +3924,4 @@ $dn_default_shaper_msg .= "</td></tr>";
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud