Project

General

Profile

« Previous | Next » 

Revision 14be378c

Added by Colin Smith over 20 years ago

Modify get_latest_pkgconfig() to work with alternate pkg_config URLs.

View differences:

etc/inc/pfsense-utils.inc
401 401
 */
402 402
function fetch_latest_pkg_config() {
403 403
    global $g;
404
    global $config;
404 405
    if(!file_exists("{$g['tmp_path']}/pkg_config.xml")) {
405
	mwexec("/usr/bin/fetch -o {$g['tmp_path']}/pkg_config.xml {$g['pkg_config_location']}");
406
	$pkg_config_location = $g['pkg_config_location'];
407
	$pkg_config_base_url = $g['pkg_config_base_url'];
408
	if(isset($config['system']['alt_pkgconfig_url']['enabled'])) {
409
	    $pkg_config_location = $config['system']['alt_pkgconfig_url']['pkgconfig_base_url'] . $config['system']['alt_pkgconfig_url']['pkgconfig_filename'];
410
	    $pkg_config_base_url = $config['system']['alt_pkgconfig_url']['pkgconfig_base_url'];
411
	mwexec("/usr/bin/fetch -o {$g['tmp_path']}/pkg_config.xml {$pkg_config_location}");
406 412
	if(!file_exists("{$g['tmp_path']}/pkg_config.xml")) {
407
	    print_info_box_np("Could not download pkg_config.xml from pfSense.com.  Check your DNS settings.");
413
	    print_info_box_np("Could not download pkg_config.xml from " . $pkg_config_base_url ". Check your DNS settings.");
408 414
	    die;
409 415
	}
410 416
    }

Also available in: Unified diff