Cosmetic changes and version number adjust

This commit is contained in:
Jose
2019-11-20 07:09:32 -04:00
parent 05e5e7ad5d
commit ffe34ddc12
5 changed files with 27 additions and 18 deletions

View File

@@ -56,6 +56,7 @@ $default_distfiles = exec("/bin/cat {$config_path} | /usr/bin/grep 'bastille_boo
$jail_dir = "{$rootfolder}/jails";
$image_dir = "ext/bastille/images";
$thick_jail = exec("/usr/local/bin/bastille create | grep -wo '\[option\]'");
$reldir = "{$rootfolder}/releases";
// Ensure the root directory is configured.
if ($rootfolder == "")
@@ -69,6 +70,12 @@ else {
}
if (is_file("{$rootfolder}/postinit")) unlink("{$rootfolder}/postinit");
// Check releases dir.
function is_dir_empty($reldir) {
if (!is_readable($reldir)) return NULL;
return (count(scandir($reldir)) == 2);
}
// Get all base releases list.
function get_all_release_list() {
global $rootfolder;
@@ -90,7 +97,7 @@ function get_all_release_list() {
// Get all interface list.
function get_all_interface_list() {
global $g;
exec("/bin/echo; /sbin/ifconfig -l | /usr/bin/tr -s ' ' '\n'; /bin/echo 'NONE'",$linkinfo);
exec("/bin/echo; /sbin/ifconfig -l | /usr/bin/tr -s ' ' '\n'; /bin/echo 'Config'",$linkinfo);
array_shift($linkinfo);
$iflist = [];
foreach($linkinfo as $link):

View File

@@ -83,7 +83,7 @@ if($_POST):
$jname = $pconfig['jailname'];
$ipaddr = $pconfig['ipaddress'];
$release = $pconfig['release'];
if ($_POST['interface'] == 'NONE'):
if ($_POST['interface'] == 'Config'):
$interface = "";
else:
$interface = $pconfig['interface'];

View File

@@ -204,11 +204,12 @@ $document->render();
<col class="area_data_settings_col_data">
</colgroup>
<thead>
<?php
html_titleline2(gettext('FreeBSD Base Release Installed'));
foreach ($sphere_array as $sphere_record):
if (file_exists("{$rootfolder}/releases/{$sphere_record['relname']}/root/.profile")):
<?php
if (!is_dir_empty($reldir)):
html_titleline2(gettext('FreeBSD Base Release Installed'));
endif;
foreach ($sphere_array as $sphere_record):
if (file_exists("{$reldir}/{$sphere_record['relname']}/root/.profile")):
html_text2('releases',gettext('Installed Base:'),htmlspecialchars($sphere_record['relname']));
else:
html_text2('releases',gettext('Unknown Base:'),htmlspecialchars($sphere_record['relname']));