Set bastille minimum version for some options

This commit is contained in:
JRGTH
2021-09-13 21:42:07 -04:00
parent e58340f361
commit 629e6a296f
4 changed files with 8 additions and 6 deletions

View File

@@ -3,6 +3,7 @@
======================
Version Description
1.0.96......Set bastille minimum version for some options.
1.0.95......Add new export/import features.
1.0.94......check for required variables for bastille 0.9.x.
1.0.93......Quick update to support bastille 0.9.x.

View File

@@ -58,12 +58,13 @@ $config_path = exec("/usr/bin/grep 'BASTILLE_CONFIG=' $configfile | /usr/bin/cut
$default_distfiles = exec("/usr/bin/grep 'bastille_bootstrap_archives=' $config_path | /usr/bin/cut -d'\"' -f2");
$jail_dir = "{$rootfolder}/jails";
$image_dir = "ext/bastille/images";
$options_support = "yes";
$reldir = "{$rootfolder}/releases";
$backup_path_bastille = exec("/usr/sbin/sysrc -f $rootfolder/bastille-dist/usr/local/etc/bastille/bastille.conf -qn bastille_backupsdir");
$zfs_support = exec("/usr/bin/grep 'ZFS_SUPPORT=' $configfile | /usr/bin/cut -d'\"' -f2");
$zfs_activated = exec("/usr/bin/grep 'ZFS_ACTIVATED=' $configfile | /usr/bin/cut -d'\"' -f2");
$tarballversion = "/usr/local/bin/bastille";
$bastille_version_min = exec("grep 'BASTILLE_VERSION=' $tarballversion | cut -d '\"' -f2 | tr -d '.'");
$host_version = exec("/bin/cat /etc/prd.version | tr -d '.'");
// Ensure the root directory is configured.
if ($rootfolder == "")

View File

@@ -199,11 +199,12 @@ $document->render();
$b_action = $l_release;
html_combobox2('interface',gettext('Network interface'),$pconfig['interface'],$a_action,'',true,false);
html_combobox2('release',gettext('Base release'),$pconfig['release'],$b_action,'',true,false);
if($options_support):
if($bastille_version_min > "0700000000"):
html_checkbox2('thickjail',gettext('Create a thick container'),!empty($pconfig['thickjail']) ? true : false,gettext('These containers consume more space, but are self contained.'),'',false);
html_checkbox2('vnetjail',gettext('Enable VNET(VIMAGE)'),!empty($pconfig['vnetjail']) ? true : false,gettext('VNET-enabled containers are attached to a virtual bridge interface for connectivity(Advanced).'),'',false);
if($host_version > "12100"):
html_checkbox2('vnetjail',gettext('Enable VNET(VIMAGE)'),!empty($pconfig['vnetjail']) ? true : false,gettext('VNET-enabled containers are attached to a virtual bridge interface for connectivity(Advanced).'),'',false);
endif;
html_checkbox2('emptyjail',gettext('Create an empty container'),!empty($pconfig['emptyjail']) ? true : false,gettext('This are ideal for custom builds, experimenting with unsupported RELEASES or Linux jails.'),'',false,false,'emptyjail_change()');
endif;
html_checkbox2('nowstart',gettext('Start after creation'),!empty($pconfig['nowstart']) ? true : false,gettext('Start the container after creation(May be overridden by later bastille releases).'),'',false);
html_checkbox2('autostart',gettext('Auto start on boot'),!empty($pconfig['autostart']) ? true : false,gettext('Automatically start the container at boot time.'),'',false);
@@ -213,7 +214,6 @@ $document->render();
<div id="submit">
<input name="Create" type="submit" class="formbtn" value="<?=gtext('Create');?>"/>
<input name="Cancel" type="submit" class="formbtn" value="<?=gtext('Cancel');?>" />
</div>
<?php
include 'formend.inc';

View File

@@ -1 +1 @@
1.0.95
1.0.96