Fix for properly copy host resolv.conf to jails
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
======================
|
======================
|
||||||
Version Description
|
Version Description
|
||||||
|
|
||||||
|
1.0.88......Fix for properly copy host resolv.conf to jails.
|
||||||
1.0.87......Cosmetic changes, update help output.
|
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.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.
|
1.0.85......Add missing system file to properly compare and merge files upon upgrades.
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ if(!get_all_release_list()):
|
|||||||
endif;
|
endif;
|
||||||
|
|
||||||
if($_POST):
|
if($_POST):
|
||||||
|
global $jail_dir;
|
||||||
global $configfile;
|
global $configfile;
|
||||||
unset($input_errors);
|
unset($input_errors);
|
||||||
$pconfig = $_POST;
|
$pconfig = $_POST;
|
||||||
@@ -69,6 +70,8 @@ if($_POST):
|
|||||||
$jname = $pconfig['jailname'];
|
$jname = $pconfig['jailname'];
|
||||||
$ipaddr = $pconfig['ipaddress'];
|
$ipaddr = $pconfig['ipaddress'];
|
||||||
$release = $pconfig['release'];
|
$release = $pconfig['release'];
|
||||||
|
$resolv_conf = "{$jail_dir}/{$jname}/root/etc/resolv.conf";
|
||||||
|
$resolv_host = "/var/etc/resolv.conf";
|
||||||
$options = "";
|
$options = "";
|
||||||
if ($_POST['interface'] == 'Config'):
|
if ($_POST['interface'] == 'Config'):
|
||||||
$interface = "";
|
$interface = "";
|
||||||
@@ -102,6 +105,11 @@ if($_POST):
|
|||||||
if ($_POST['autostart']):
|
if ($_POST['autostart']):
|
||||||
exec("/usr/sbin/sysrc -f {$configfile} {$jname}_AUTO_START=\"YES\"");
|
exec("/usr/sbin/sysrc -f {$configfile} {$jname}_AUTO_START=\"YES\"");
|
||||||
endif;
|
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.");
|
//$savemsg .= gtext("Boot Environment created and activated successfully.");
|
||||||
header('Location: bastille_manager_gui.php');
|
header('Location: bastille_manager_gui.php');
|
||||||
exit;
|
exit;
|
||||||
|
|||||||
Reference in New Issue
Block a user