Display bastille bootstrap output after base release fetch
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
======================
|
======================
|
||||||
Version Description
|
Version Description
|
||||||
|
|
||||||
|
1.0.57......Display bastille bootstrap output after base release fetch.
|
||||||
1.0.56......Add extra confirmation before extension removal.
|
1.0.56......Add extra confirmation before extension removal.
|
||||||
1.0.55......Add backup path config check.
|
1.0.55......Add backup path config check.
|
||||||
1.0.54......Don't skip ZFS activation if "Available but not enabled" status displayed.
|
1.0.54......Don't skip ZFS activation if "Available but not enabled" status displayed.
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ $sphere_array = $rel_list;
|
|||||||
|
|
||||||
if($_POST):
|
if($_POST):
|
||||||
unset($input_errors);
|
unset($input_errors);
|
||||||
|
unset($errormsg);
|
||||||
unset($savemsg);
|
unset($savemsg);
|
||||||
$pconfig = $_POST;
|
$pconfig = $_POST;
|
||||||
if(isset($_POST['Cancel']) && $_POST['Cancel']):
|
if(isset($_POST['Cancel']) && $_POST['Cancel']):
|
||||||
@@ -81,7 +82,7 @@ if($_POST):
|
|||||||
if (isset($_POST['Download']) && $_POST['Download']):
|
if (isset($_POST['Download']) && $_POST['Download']):
|
||||||
$get_release = $pconfig['release_item'];
|
$get_release = $pconfig['release_item'];
|
||||||
$check_release = ("{$rootfolder}/releases/{$get_release}");
|
$check_release = ("{$rootfolder}/releases/{$get_release}");
|
||||||
$cmd = ("/usr/local/bin/bastille bootstrap {$get_release}");
|
$cmd = sprintf('/usr/local/bin/bastille bootstrap %1$s > %2$s',$get_release,$logevent);
|
||||||
$base_mandatory = "base";
|
$base_mandatory = "base";
|
||||||
|
|
||||||
unset($lib32,$ports,$src);
|
unset($lib32,$ports,$src);
|
||||||
@@ -96,29 +97,35 @@ if($_POST):
|
|||||||
endif;
|
endif;
|
||||||
$opt_tarballs = "$lib32 $ports $src";
|
$opt_tarballs = "$lib32 $ports $src";
|
||||||
|
|
||||||
if(file_exists($check_release)):
|
// FreeBSD base release check.
|
||||||
// FreeBSD base release check.
|
//if(file_exists($check_release)):
|
||||||
$savemsg .= sprintf(gtext('%s base appears to be already extracted.'),$get_release);
|
// $savemsg .= sprintf(gtext('%s base appears to be already extracted.'),$get_release);
|
||||||
else:
|
//else:
|
||||||
// Download a FreeBSD base release.
|
// Download a FreeBSD base release.
|
||||||
if ($_POST['Download']):
|
if ($_POST['Download']):
|
||||||
if ($opt_tarballs):
|
if ($opt_tarballs):
|
||||||
if ($config_path):
|
if ($config_path):
|
||||||
// Override default distfiles.
|
// Override default distfiles once.
|
||||||
exec("/usr/sbin/sysrc -f {$config_path} bastille_bootstrap_archives=\"$base_mandatory $opt_tarballs\"");
|
exec("/usr/sbin/sysrc -f {$config_path} bastille_bootstrap_archives=\"$base_mandatory $opt_tarballs\"");
|
||||||
endif;
|
endif;
|
||||||
endif;
|
endif;
|
||||||
unset($output,$retval);mwexec2($cmd,$output,$retval);
|
$return_val = 0;
|
||||||
if($retval == 0):
|
$output = [];
|
||||||
//$savemsg .= sprintf(gtext('%s base downloaded and extracted successfully.'),$get_release);
|
exec($cmd,$output,$return_val);
|
||||||
// Set back default distfiles.
|
if($return_val == 0):
|
||||||
exec("/usr/sbin/sysrc -f {$config_path} bastille_bootstrap_archives=\"$default_distfiles\"");
|
ob_start();
|
||||||
header('Location: bastille_manager_tarballs.php');
|
include("{$logevent}");
|
||||||
|
$ausgabe = ob_get_contents();
|
||||||
|
$ausgabe = preg_replace('/\e[[][A-Za-z0-9];?[0-9]*m?/', '', $ausgabe);
|
||||||
|
ob_end_clean();
|
||||||
|
$savemsg .= str_replace("\n", "<br />", $ausgabe)."<br />";
|
||||||
|
exec("/usr/sbin/sysrc -f {$configfile} ZFS_ACTIVATED=\"YES\"");
|
||||||
else:
|
else:
|
||||||
|
//$input_errors[] = gtext('An error has occurred ??????.');
|
||||||
$errormsg .= sprintf(gtext('%s Failed to download and/or extract release base.'),$get_release);
|
$errormsg .= sprintf(gtext('%s Failed to download and/or extract release base.'),$get_release);
|
||||||
endif;
|
endif;
|
||||||
endif;
|
endif;
|
||||||
endif;
|
//endif;
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
if (isset($_POST['Destroy']) && $_POST['Destroy']):
|
if (isset($_POST['Destroy']) && $_POST['Destroy']):
|
||||||
|
|||||||
Reference in New Issue
Block a user