Project

General

Profile

« Previous | Next » 

Revision 84d50fe7

Added by Phil Davis about 13 years ago

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

View differences:

etc/inc/pkg-utils.inc
8 8
 *   $Id$
9 9
 ******
10 10
 *
11
 * Copyright (C) 2010 Ermal Lu?i
11
 * Copyright (C) 2010 Ermal Lui
12 12
 * Copyright (C) 2005-2006 Colin Smith (ethethlay@gmail.com)
13 13
 * All rights reserved.
14 14
 * Redistribution and use in source and binary forms, with or without
......
794 794
				 *	change packages to store configs at /usr/pbi/pkg/etc and remove this
795 795
				 */
796 796
				eval_once($pkg_config['custom_php_install_command']);
797
				exec("/usr/local/sbin/pbi_info | grep {$pkg} | xargs /usr/local/sbin/pbi_info | awk '/Prefix/ {print $2}'",$pbidir);
798
				$pbidir = $pbidir[0];
797
				exec("/usr/local/sbin/pbi_info | grep {$pkg}- | xargs /usr/local/sbin/pbi_info | awk '/Prefix/ {print $2}'",$pbidirarray);
798
				$pbidir0 = $pbidirarray[0];
799 799
				exec("find /usr/local/etc/ -name *.conf | grep {$pkg}",$files);
800 800
				foreach($files as $f) {
801
					$pbiconf = str_replace('/usr/local',$pbidir,$f);
801
					$pbiconf = str_replace('/usr/local',$pbidir0,$f);
802 802
					unlink($pbiconf);
803 803
					symlink($f,$pbiconf);
804 804
				}

Also available in: Unified diff