Improve jail/base update, execute fetch/install commands individually
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
======================
|
======================
|
||||||
Version Description
|
Version Description
|
||||||
|
|
||||||
|
1.0.83......Improve jail/base update, execute fetch/install commands individually.
|
||||||
1.0.82......Add missing system file to prevent makewhatis not found warning.
|
1.0.82......Add missing system file to prevent makewhatis not found warning.
|
||||||
1.0.81......Update GUI pages to work with later bastille releases.
|
1.0.81......Update GUI pages to work with later bastille releases.
|
||||||
1.0.80......Add checking for FreeBSD and HardenedBSD on upgrades.
|
1.0.80......Add checking for FreeBSD and HardenedBSD on upgrades.
|
||||||
|
|||||||
+6
-2
@@ -577,7 +577,9 @@ jail_update()
|
|||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
env PAGER="/bin/cat" ${FREEBSD_UPDATE}/freebsd-update --not-running-from-cron -f ${FREEBSD_UPDATE}/freebsd-update.conf \
|
env PAGER="/bin/cat" ${FREEBSD_UPDATE}/freebsd-update --not-running-from-cron -f ${FREEBSD_UPDATE}/freebsd-update.conf \
|
||||||
-d ${CWDIR}/freebsd-update -b "${bastille_jailsdir}/${TARGET}/root" fetch install --currently-running "${CURRENT_VERSION}"
|
-d ${CWDIR}/freebsd-update -b "${bastille_jailsdir}/${TARGET}/root" fetch --currently-running "${CURRENT_VERSION}"
|
||||||
|
${FREEBSD_UPDATE}/freebsd-update --not-running-from-cron -f ${FREEBSD_UPDATE}/freebsd-update.conf \
|
||||||
|
-d ${CWDIR}/freebsd-update -b "${bastille_jailsdir}/${TARGET}/root" install --currently-running "${CURRENT_VERSION}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Container not running."
|
echo "Container not running."
|
||||||
@@ -596,7 +598,9 @@ jail_update()
|
|||||||
if [ -d "${bastille_releasesdir}/${TARGET}" ]; then
|
if [ -d "${bastille_releasesdir}/${TARGET}" ]; then
|
||||||
# Update container base(affects base child containers).
|
# Update container base(affects base child containers).
|
||||||
env PAGER="/bin/cat" ${FREEBSD_UPDATE}/freebsd-update --not-running-from-cron -f ${FREEBSD_UPDATE}/freebsd-update.conf \
|
env PAGER="/bin/cat" ${FREEBSD_UPDATE}/freebsd-update --not-running-from-cron -f ${FREEBSD_UPDATE}/freebsd-update.conf \
|
||||||
-d ${CWDIR}/freebsd-update -b "${bastille_releasesdir}/${TARGET}" fetch install --currently-running "${TARGET}"
|
-d ${CWDIR}/freebsd-update -b "${bastille_releasesdir}/${TARGET}" fetch --currently-running "${TARGET}"
|
||||||
|
${FREEBSD_UPDATE}/freebsd-update --not-running-from-cron -f ${FREEBSD_UPDATE}/freebsd-update.conf \
|
||||||
|
-d ${CWDIR}/freebsd-update -b "${bastille_releasesdir}/${TARGET}" install --currently-running "${TARGET}"
|
||||||
else
|
else
|
||||||
echo "${TARGET} not found. See bootstrap."
|
echo "${TARGET} not found. See bootstrap."
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -167,8 +167,11 @@ if($_POST):
|
|||||||
|
|
||||||
if ($_POST['update_base']):
|
if ($_POST['update_base']):
|
||||||
$cmd = ("/usr/local/sbin/bastille-init update '{$current_release}'");
|
$cmd = ("/usr/local/sbin/bastille-init update '{$current_release}'");
|
||||||
|
elseif ($_POST['update_jail']):
|
||||||
|
$cmd = ("/usr/local/sbin/bastille-init update '{$item}'");
|
||||||
else:
|
else:
|
||||||
$cmd = ("/usr/local/sbin/bastille-init update '{$item}' && /usr/local/sbin/bastille-init install '{$item}'");
|
$input_errors[] = sprintf(gtext("Failed to update container %s."),$item);
|
||||||
|
break;
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
unset($output,$retval);mwexec2($cmd,$output,$retval);
|
unset($output,$retval);mwexec2($cmd,$output,$retval);
|
||||||
@@ -372,6 +375,7 @@ function action_change() {
|
|||||||
showElementById('jail_release_tr', 'hide');
|
showElementById('jail_release_tr', 'hide');
|
||||||
showElementById('release_tr','hide');
|
showElementById('release_tr','hide');
|
||||||
showElementById('update_base_tr','hide');
|
showElementById('update_base_tr','hide');
|
||||||
|
showElementById('update_jail_tr','hide');
|
||||||
showElementById('newname_tr', 'hide');
|
showElementById('newname_tr', 'hide');
|
||||||
showElementById('newipaddr_tr', 'hide');
|
showElementById('newipaddr_tr', 'hide');
|
||||||
showElementById('clonestop_tr', 'hide');
|
showElementById('clonestop_tr', 'hide');
|
||||||
@@ -393,6 +397,7 @@ function action_change() {
|
|||||||
showElementById('confirmname_tr','hide');
|
showElementById('confirmname_tr','hide');
|
||||||
showElementById('nowstop_tr','hide');
|
showElementById('nowstop_tr','hide');
|
||||||
showElementById('update_base_tr','show');
|
showElementById('update_base_tr','show');
|
||||||
|
showElementById('update_jail_tr','show');
|
||||||
break;
|
break;
|
||||||
case "base":
|
case "base":
|
||||||
showElementById('confirmname_tr','hide');
|
showElementById('confirmname_tr','hide');
|
||||||
@@ -516,7 +521,7 @@ $document->render();
|
|||||||
if ($is_thickjail):
|
if ($is_thickjail):
|
||||||
html_checkbox2('update_base',gettext('Base update confirm'),!empty($pconfig['update_base']) ? true : false,gettext('This is a thin container, therefore the base release will be updated, this affects child containers.'),'',true);
|
html_checkbox2('update_base',gettext('Base update confirm'),!empty($pconfig['update_base']) ? true : false,gettext('This is a thin container, therefore the base release will be updated, this affects child containers.'),'',true);
|
||||||
else:
|
else:
|
||||||
html_text2('update_base',gettext('Container update confirm:'),gettext('This is a thick container, therefore the update will be performed within its root, current containers are not affected.'));
|
html_checkbox2('update_jail',gettext('Container update confirm:'),!empty($pconfig['update_jail']) ? true : false,gettext('This is a thick container, therefore the update will be performed within its root, current containers are not affected.'),'',true);
|
||||||
endif;
|
endif;
|
||||||
html_text2('jail_release',gettext('Current base release:'),htmlspecialchars($current_release));
|
html_text2('jail_release',gettext('Current base release:'),htmlspecialchars($current_release));
|
||||||
html_text2('auto_boot',gettext('Enable container auto-startup'),htmlspecialchars("This will cause the container to automatically start each time the system restart."));
|
html_text2('auto_boot',gettext('Enable container auto-startup'),htmlspecialchars("This will cause the container to automatically start each time the system restart."));
|
||||||
|
|||||||
Reference in New Issue
Block a user