Fix for properly copy host resolv.conf to jails

This commit is contained in:
Jose
2021-02-07 22:23:08 -04:00
parent 1a5f82da4c
commit 14b95626d3
3 changed files with 10 additions and 1 deletions

View File

@@ -3,6 +3,7 @@
======================
Version Description
1.0.88......Fix for properly copy host resolv.conf to jails.
1.0.87......Cosmetic changes, update help output.
1.0.86......Implement release native upgrade, re-add makewhatis since is needed by freebsd-update.
1.0.85......Add missing system file to properly compare and merge files upon upgrades.

View File

@@ -58,6 +58,7 @@ if(!get_all_release_list()):
endif;
if($_POST):
global $jail_dir;
global $configfile;
unset($input_errors);
$pconfig = $_POST;
@@ -69,6 +70,8 @@ if($_POST):
$jname = $pconfig['jailname'];
$ipaddr = $pconfig['ipaddress'];
$release = $pconfig['release'];
$resolv_conf = "{$jail_dir}/{$jname}/root/etc/resolv.conf";
$resolv_host = "/var/etc/resolv.conf";
$options = "";
if ($_POST['interface'] == 'Config'):
$interface = "";
@@ -102,6 +105,11 @@ if($_POST):
if ($_POST['autostart']):
exec("/usr/sbin/sysrc -f {$configfile} {$jname}_AUTO_START=\"YES\"");
endif;
if(is_link($resolv_conf)):
if(unlink($resolv_conf)):
exec("/usr/local/bin/bastille cp $jname $resolv_host etc");
endif;
endif;
//$savemsg .= gtext("Boot Environment created and activated successfully.");
header('Location: bastille_manager_gui.php');
exit;

View File

@@ -1 +1 @@
1.0.87
1.0.88