diff options
author | Phil Davis <phil.davis@world.inf.org> | 2012-03-20 16:59:10 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@world.inf.org> | 2012-03-20 16:59:10 +0545 |
commit | 84d50fe73c78a4034019bbd7906d0bd4b966588b (patch) | |
tree | 569667c73336cce6fc09f0bb5321f7d10e23c0fb /etc/inc/pkg-utils.inc | |
parent | 29bf947e245a9a3f5202012582e7ba1dde0a57e8 (diff) | |
download | pfsense-84d50fe73c78a4034019bbd7906d0bd4b966588b.zip pfsense-84d50fe73c78a4034019bbd7906d0bd4b966588b.tar.gz |
Fix case where package names are substrings of each other. e.g. "squid" and "squid_radius_auth". Look for "squid-", which will match the full PBI package name for squid but will not match "squid_radius_auth". Bug #2301
Diffstat (limited to 'etc/inc/pkg-utils.inc')
-rw-r--r-- | etc/inc/pkg-utils.inc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index 8f60e61..7734cc7 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -8,7 +8,7 @@ * $Id$ ****** * - * Copyright (C) 2010 Ermal Luçi + * Copyright (C) 2010 Ermal Lu�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); } |