aboutsummaryrefslogtreecommitdiffstats
path: root/config/dansguardian
diff options
context:
space:
mode:
authortimdufrane <tim.dufrane@gmail.com>2013-08-13 21:35:10 -0400
committertimdufrane <tim.dufrane@gmail.com>2013-08-13 21:35:10 -0400
commita6241f27938f2c09470d43c9a151a334f9923222 (patch)
tree14cd8de915dd2e72b98db00c8b6e487459adbafb /config/dansguardian
parentd343974b2f04ac455099b0e0fdf69f687c670ac1 (diff)
downloadpfsense-packages-a6241f27938f2c09470d43c9a151a334f9923222.tar.gz
pfsense-packages-a6241f27938f2c09470d43c9a151a334f9923222.tar.bz2
pfsense-packages-a6241f27938f2c09470d43c9a151a334f9923222.zip
Fix Incorrect Directory Replacement
On some installs, the directory ends up being /usr/pbi/dansguardian-xxx/... This results in include lines not being written correctly and broken config files. DANSGUARDIAN_DIR should be present on every system.
Diffstat (limited to 'config/dansguardian')
-rwxr-xr-xconfig/dansguardian/dansguardian.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/config/dansguardian/dansguardian.inc b/config/dansguardian/dansguardian.inc
index 39282409..d4cd94bd 100755
--- a/config/dansguardian/dansguardian.inc
+++ b/config/dansguardian/dansguardian.inc
@@ -331,7 +331,7 @@ function sync_package_dansguardian($via_rpc="no",$install_process=false) {
#includes preg_replace patterns
$match[0]="/(.)$/";
- $match[1]="/\/usr.local/";
+ $match[1]="/\/usr.local|".str_replace("/","\\/",DANSGUARDIAN_DIR)."/";
$match[2]="/,/";
$replace[0]="$1>\n";
$replace[1]="\n.Include<".DANSGUARDIAN_DIR;
@@ -1416,4 +1416,4 @@ function dansguardian_do_xmlrpc_sync($sync_to_ip,$username,$password,$sync_type,
}
}
-?> \ No newline at end of file
+?>