Add externallly bridged vnet jails option

This commit is contained in:
JRGTH
2024-09-05 22:31:45 -04:00
parent 10f299268e
commit 21566c34e9
3 changed files with 66 additions and 2 deletions

View File

@@ -3,6 +3,7 @@
====================== ======================
Version Description Version Description
1.1.34......Add option to create externally bridged vnet jails thought the webgui.
1.1.33......Update: Add support for 14.0 and 14.1 releases. 1.1.33......Update: Add support for 14.0 and 14.1 releases.
1.1.32......Update release list, tarballs.php to include 13.3. 1.1.32......Update release list, tarballs.php to include 13.3.
1.1.31......Update bastille config files. 1.1.31......Update bastille config files.

View File

@@ -93,10 +93,14 @@ if($_POST):
if(isset($_POST['thickjail']) && isset($_POST['vnetjail'])): if(isset($_POST['thickjail']) && isset($_POST['vnetjail'])):
$options = "-T -V"; $options = "-T -V";
elseif(isset($_POST['thickjail']) && isset($_POST['bridgejail'])):
$options = "-T -B";
elseif(isset($_POST['thickjail'])): elseif(isset($_POST['thickjail'])):
$options = "-T"; $options = "-T";
elseif(isset($_POST['vnetjail'])): elseif(isset($_POST['vnetjail'])):
$options = "-V"; $options = "-V";
elseif(isset($_POST['bridgejail'])):
$options = "-B";
elseif(isset($_POST['linuxjail'])): elseif(isset($_POST['linuxjail'])):
$options = "-L"; $options = "-L";
endif; endif;
@@ -153,6 +157,7 @@ function emptyjail_change() {
showElementById('release_tr', 'show'); showElementById('release_tr', 'show');
showElementById('thickjail_tr', 'show'); showElementById('thickjail_tr', 'show');
showElementById('vnetjail_tr', 'show'); showElementById('vnetjail_tr', 'show');
showElementById('bridgejail_tr', 'show');
showElementById('nowstart_tr', 'show'); showElementById('nowstart_tr', 'show');
showElementById('autostart_tr', 'show'); showElementById('autostart_tr', 'show');
showElementById('linuxjail_tr', 'show'); showElementById('linuxjail_tr', 'show');
@@ -163,6 +168,7 @@ function emptyjail_change() {
showElementById('release_tr', 'hide'); showElementById('release_tr', 'hide');
showElementById('thickjail_tr', 'hide'); showElementById('thickjail_tr', 'hide');
showElementById('vnetjail_tr', 'hide'); showElementById('vnetjail_tr', 'hide');
showElementById('bridgejail_tr', 'hide');
showElementById('nowstart_tr', 'hide'); showElementById('nowstart_tr', 'hide');
showElementById('autostart_tr', 'hide'); showElementById('autostart_tr', 'hide');
showElementById('linuxjail_tr', 'hide'); showElementById('linuxjail_tr', 'hide');
@@ -178,6 +184,7 @@ function linuxjail_change() {
showElementById('release_tr', 'show'); showElementById('release_tr', 'show');
showElementById('thickjail_tr', 'show'); showElementById('thickjail_tr', 'show');
showElementById('vnetjail_tr', 'show'); showElementById('vnetjail_tr', 'show');
showElementById('bridgejail_tr', 'show');
showElementById('nowstart_tr', 'show'); showElementById('nowstart_tr', 'show');
showElementById('autostart_tr', 'show'); showElementById('autostart_tr', 'show');
showElementById('linuxjail_tr', 'show'); showElementById('linuxjail_tr', 'show');
@@ -189,6 +196,7 @@ function linuxjail_change() {
showElementById('release_tr', 'show'); showElementById('release_tr', 'show');
showElementById('thickjail_tr', 'hide'); showElementById('thickjail_tr', 'hide');
showElementById('vnetjail_tr', 'hide'); showElementById('vnetjail_tr', 'hide');
showElementById('bridgejail_tr', 'hide');
showElementById('nowstart_tr', 'show'); showElementById('nowstart_tr', 'show');
showElementById('autostart_tr', 'show'); showElementById('autostart_tr', 'show');
showElementById('emptyjail_tr', 'hide'); showElementById('emptyjail_tr', 'hide');
@@ -196,6 +204,60 @@ function linuxjail_change() {
} }
} }
function vnetjail_change() {
switch(document.iform.vnetjail.checked) {
case false:
showElementById('ipaddress_tr','show');
showElementById('interface_tr', 'show');
showElementById('release_tr', 'show');
showElementById('thickjail_tr', 'show');
showElementById('vnetjail_tr', 'show');
showElementById('bridgejail_tr', 'show');
showElementById('nowstart_tr', 'show');
showElementById('autostart_tr', 'show');
showElementById('linuxjail_tr', 'show');
break;
case true:
showElementById('ipaddress_tr','show');
showElementById('interface_tr', 'show');
showElementById('release_tr', 'show');
showElementById('thickjail_tr', 'show');
showElementById('vnetjail_tr', 'show');
showElementById('bridgejail_tr', 'hide');
showElementById('nowstart_tr', 'show');
showElementById('autostart_tr', 'show');
showElementById('linuxjail_tr', 'show');
break;
}
}
function bridgejail_change() {
switch(document.iform.bridgejail.checked) {
case false:
showElementById('ipaddress_tr','show');
showElementById('interface_tr', 'show');
showElementById('release_tr', 'show');
showElementById('thickjail_tr', 'show');
showElementById('vnetjail_tr', 'show');
showElementById('bridgejail_tr', 'show');
showElementById('nowstart_tr', 'show');
showElementById('autostart_tr', 'show');
showElementById('linuxjail_tr', 'show');
break;
case true:
showElementById('ipaddress_tr','show');
showElementById('interface_tr', 'show');
showElementById('release_tr', 'show');
showElementById('thickjail_tr', 'show');
showElementById('vnetjail_tr', 'hide');
showElementById('bridgejail_tr', 'show');
showElementById('nowstart_tr', 'show');
showElementById('autostart_tr', 'show');
showElementById('linuxjail_tr', 'show');
break;
}
}
//]]> //]]>
</script> </script>
<?php <?php
@@ -245,7 +307,8 @@ $document->render();
if($bastille_version_min > "0700000000"): 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('thickjail',gettext('Create a thick container'),!empty($pconfig['thickjail']) ? true : false,gettext('These containers consume more space, but are self contained.'),'',false);
if($host_version > "12100"): 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(Only supported on 13.x and above).'),'',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(Only supported on 13.x and above).'),'',false,false,'vnetjail_change()');
html_checkbox2('bridgejail',gettext('Enable Bridge VNET(VIMAGE)'),!empty($pconfig['bridgejail']) ? true : false,gettext('Bridge VNET-enabled containers are attached to a specified, already existing external bridge(Only supported on 13.x and above).'),'',false,false,'bridgejail_change()');
endif; 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()'); 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()');
if($linux_compat_support == "YES"): if($linux_compat_support == "YES"):

View File

@@ -1 +1 @@
1.1.33 1.1.34