Merge remote branch 'upstream/master'

This commit is contained in:
Scott Ullrich 2011-02-27 16:21:27 -05:00
commit 4e0cb56eb5
6 changed files with 23 additions and 7 deletions

View File

@ -453,8 +453,11 @@ function pkg_fetch_recursive($pkgname, $filename, $dependlevel = 0, $base_url =
if (($g['platform'] == "nanobsd") || ($g['platform'] == "embedded")) {
$pkgtmpdir = "/usr/bin/env PKG_TMPDIR=/root/ ";
$pkgstaging = "-t /root/tmp/instmp.XXXXXX";
$fetchdir = "/root/tmp/";
$pkgstagingdir = "/root/tmp";
if (!is_dir($pkgstagingdir))
mkdir($pkgstagingdir);
$pkgstaging = "-t {$pkgstagingdir}/instmp.XXXXXX";
$fetchdir = $pkgstagingdir;
} else {
$fetchdir = $g['tmp_path'];
}

View File

@ -16,6 +16,7 @@ conf_mount_rw();
$GIT_REPO="http://gitweb.pfsense.org/pfsense/mainline.git";
$CODIR = "/root/pfsense/";
global $g;
global $argv;
global $command_split;
@ -29,7 +30,10 @@ if(!file_exists("/usr/local/bin/git")) {
echo "Cannot find git, fetching...";
if (($g['platform'] == "nanobsd") || ($g['platform'] == "embedded")) {
$pkgtmpdir = "/usr/bin/env PKG_TMPDIR=/root/ ";
$pkgstaging = "-t /root/tmp/instmp.XXXXXX";
$pkgstagingdir = "/root/tmp";
if (!is_dir($pkgstagingdir))
mkdir($pkgstagingdir);
$pkgstaging = "-t {$pkgstagingdir}/instmp.XXXXXX";
}
system("{$pkgtmpdir}/usr/sbin/pkg_add {$pkgstaging} -r git");
}

View File

@ -105,6 +105,8 @@ $crash_report_header .= "\nCrash report details:\n";
$files_to_upload = glob("/var/crash/*");
echo "<p/>";
echo gettext("Uploading...");
ob_flush();
flush();
if(is_array($files_to_upload)) {
$resp = upload_crash_report($files_to_upload);
exec("rm /var/crash/*");

View File

@ -418,8 +418,15 @@ function print_info_box($msg) {
function get_std_save_message($ok) {
global $d_sysrebootreqd_path;
return "The changes have been applied successfully.<br/>You can also <a href='status_filter_reload.php'>monitor</a> the filter reload progress.";
$filter_related = false;
$filter_pages = array("nat", "filter");
$to_return = "The changes have been applied successfully.";
foreach($filter_pages as $fp)
if(stristr($_SERVER['SCRIPT_FILENAME'], $fp))
$filter_related = true;
if($filter_related)
$to_return .= "<br/>You can also <a href='status_filter_reload.php'>monitor</a> the filter reload progress.";
return $to_return;
}
function pprint_address($adr) {

View File

@ -131,7 +131,7 @@ if ($g['platform'] == "nanobsd") {
$nanosize .= strtolower(trim(file_get_contents("/etc/nanosize.txt")));
}
if(download_file_with_progress_bar("{$updater_url}/version{$nanosize}", "/tmp/{$g['product_name']}_version", 'read_body', 5, 5))
if(download_file_with_progress_bar("{$updater_url}/version{$nanosize}", "/tmp/{$g['product_name']}_version", 'read_body', 5, 5) === true)
$remote_version = trim(@file_get_contents("/tmp/{$g['product_name']}_version"));
$static_text .= gettext("done") . "\\n";
if (!$remote_version) {

View File

@ -49,7 +49,7 @@ if($_REQUEST['getupdatestatus']) {
}
@unlink("/tmp/{$g['product_name']}_version");
if (download_file_with_progress_bar("{$updater_url}/version{$nanosize}", "/tmp/{$g['product_name']}_version", 'read_body', 5, 5))
if (download_file_with_progress_bar("{$updater_url}/version{$nanosize}", "/tmp/{$g['product_name']}_version", 'read_body', 5, 5) === true)
$remote_version = trim(@file_get_contents("/tmp/{$g['product_name']}_version"));
if(empty($remote_version))