mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Merge pull request #65 from phil-davis/master
Bug #2301: Handle case when PBI package names are substrings of each other
This commit is contained in:
commit
89cb50deb8
@ -8,7 +8,7 @@
|
||||
* $Id$
|
||||
******
|
||||
*
|
||||
* Copyright (C) 2010 Ermal Luçi
|
||||
* Copyright (C) 2010 Ermal Lu<EFBFBD>i
|
||||
* Copyright (C) 2005-2006 Colin Smith (ethethlay@gmail.com)
|
||||
* All rights reserved.
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -794,11 +794,11 @@ function install_package_xml($pkg) {
|
||||
* change packages to store configs at /usr/pbi/pkg/etc and remove this
|
||||
*/
|
||||
eval_once($pkg_config['custom_php_install_command']);
|
||||
exec("/usr/local/sbin/pbi_info | grep {$pkg} | xargs /usr/local/sbin/pbi_info | awk '/Prefix/ {print $2}'",$pbidir);
|
||||
$pbidir = $pbidir[0];
|
||||
exec("/usr/local/sbin/pbi_info | grep {$pkg}- | xargs /usr/local/sbin/pbi_info | awk '/Prefix/ {print $2}'",$pbidirarray);
|
||||
$pbidir0 = $pbidirarray[0];
|
||||
exec("find /usr/local/etc/ -name *.conf | grep {$pkg}",$files);
|
||||
foreach($files as $f) {
|
||||
$pbiconf = str_replace('/usr/local',$pbidir,$f);
|
||||
$pbiconf = str_replace('/usr/local',$pbidir0,$f);
|
||||
unlink($pbiconf);
|
||||
symlink($f,$pbiconf);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user