diff options
author | Colin Smith <colin@pfsense.org> | 2005-05-07 01:09:06 +0000 |
---|---|---|
committer | Colin Smith <colin@pfsense.org> | 2005-05-07 01:09:06 +0000 |
commit | bd21e2b7d2505f9237a5599edaf053d4ca7a9160 (patch) | |
tree | de6052f7246e0a9c6f5edaabd036c376973b64fa /etc | |
parent | 39e10a30679d38db3351e60fc77513f52efdee83 (diff) | |
download | pfsense-bd21e2b7d2505f9237a5599edaf053d4ca7a9160.zip pfsense-bd21e2b7d2505f9237a5599edaf053d4ca7a9160.tar.gz |
Only check the categories we need too.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 2d7ffa6..c8cea70 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -1095,20 +1095,28 @@ function auto_upgrade() { /* * check_firmware_version(): Check whether the current firmware installed is the most recently released. */ -function check_firmware_version($return_php = true) { +function check_firmware_version($tocheck = "all", $return_php = true) { global $g; $versioncheck_base_url = $g['versioncheckbaseurl']; $versioncheck_path = $g['versioncheckpath']; if(isset($config['system']['alt_firmware_url']['enabled']) and isset($config['system']['alt_firmware_url']['versioncheck_base_url'])) { $versioncheck_base_url = $config['system']['alt_firmware_url']['versioncheck_base_url']; } - $params = array("firmware" => array("version" => trim(file_get_contents('/etc/version'))), + $rawparams = array("firmware" => array("version" => trim(file_get_contents('/etc/version'))), "kernel" => array("version" => trim(file_get_contents('/etc/version_kernel'))), "base" => array("version" => trim(file_get_contents('/etc/version_base'))), "platform" => trim(file_get_contents('/etc/platform')) ); + if($tocheck = "all") { + $params = $rawparams; + } else { + foreach($tocheck as $check) { + $params['check'] = $rawparams['check']; + $params['platform'] = $rawparams['platform']; + } + } if(isset($config['system']['firmwarebranch'])) { - foreach($params as $aparam) $aparam['branch'] = $config['system']['firmwarebranch']; + $params['branch'] = $config['system']['firmwarebranch']; } $xmlparams = php_value_to_xmlrpc($params); $msg = new XML_RPC_Message('pfsense.get_firmware_version', array($xmlparams)); @@ -1119,4 +1127,4 @@ function check_firmware_version($return_php = true) { return $raw_versions; } -?>
\ No newline at end of file +?> |