mirror of
https://github.com/JRGTH/xigmanas-bastille-extension.git
synced 2025-12-11 17:31:09 +01:00
Handle osrelease parameter update in bastille-init
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
======================
|
======================
|
||||||
Version Description
|
Version Description
|
||||||
|
|
||||||
|
1.1.53......Code changes, handle osrelease parameter update in bastille-init.
|
||||||
1.1.52......Re-add Thin jail release change and code improvements.
|
1.1.52......Re-add Thin jail release change and code improvements.
|
||||||
1.1.51......Code update/improvements, update jail config/util pages and bastille-init.
|
1.1.51......Code update/improvements, update jail config/util pages and bastille-init.
|
||||||
1.1.50......Disable linux_compat due incompatibility with later releases.
|
1.1.50......Disable linux_compat due incompatibility with later releases.
|
||||||
|
|||||||
@@ -793,6 +793,8 @@ release_change()
|
|||||||
# If the previous conditions meets, proceed with the container base upgrade.
|
# If the previous conditions meets, proceed with the container base upgrade.
|
||||||
sed -i '' "s/${RELEASE}/${NEWRELEASE}/g" ${bastille_jailsdir}/${TARGET}/fstab
|
sed -i '' "s/${RELEASE}/${NEWRELEASE}/g" ${bastille_jailsdir}/${TARGET}/fstab
|
||||||
echo "${TARGET} release changed to ${NEWRELEASE}."
|
echo "${TARGET} release changed to ${NEWRELEASE}."
|
||||||
|
echo "Setting OS release for ${TARGET}."
|
||||||
|
bastille config ${TARGET} set osrelease ${NEWRELEASE}
|
||||||
elif cat "${bastille_jailsdir}/${TARGET}/fstab" | grep "${NEWRELEASE}" | grep -qw "/.*/.bastille"; then
|
elif cat "${bastille_jailsdir}/${TARGET}/fstab" | grep "${NEWRELEASE}" | grep -qw "/.*/.bastille"; then
|
||||||
echo "${TARGET} already using ${NEWRELEASE}."
|
echo "${TARGET} already using ${NEWRELEASE}."
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -275,7 +275,6 @@ if($_POST):
|
|||||||
unset($output,$retval);mwexec2($cmd,$output,$retval);
|
unset($output,$retval);mwexec2($cmd,$output,$retval);
|
||||||
if($retval == 0):
|
if($retval == 0):
|
||||||
$savemsg .= sprintf(gtext("Container base release changed to %s successfully."),$new_release);
|
$savemsg .= sprintf(gtext("Container base release changed to %s successfully."),$new_release);
|
||||||
exec("/usr/local/bin/bastille config {$item} set osrelease $new_release");
|
|
||||||
exec("echo '{$date}: {$application}: Container base release changed to {$new_release} on {$item} successfully' >> {$logfile}");
|
exec("echo '{$date}: {$application}: Container base release changed to {$new_release} on {$item} successfully' >> {$logfile}");
|
||||||
//header('Location: bastille_manager_gui.php');
|
//header('Location: bastille_manager_gui.php');
|
||||||
//exit;
|
//exit;
|
||||||
|
|||||||
Reference in New Issue
Block a user