Make sure minor changes are always applied

This commit is contained in:
JRGTH
2025-11-02 04:30:09 -04:00
parent 7452d2a08e
commit 4831551b4f
4 changed files with 27 additions and 28 deletions

View File

@@ -3,6 +3,7 @@
======================
Version Description
1.2.22......Make sure minor changes are always applied.
1.2.21......Check/update bastille config parameters on runtime.
1.2.20......Allow install in zroot platform with optional zfs dataset.
1.2.19......Fix typo in tarballs page and cleanup, thanks to Lux.

7
bastille-init Normal file → Executable file
View File

@@ -1226,15 +1226,12 @@ get_versions()
post_upgrade()
{
# Check/apply for required/pending updates/fixes if any.
# This file will be removed after success execution.
# This function is intended to apply several/temporary changes to the extension once.
if sysrc -f ${CWDIR}${EXTCONF} -qc EXTENSION_UPGRADED=1; then
if [ -f "${CWDIR}/post_upgrade.sh" ]; then
echo "Executing post_upgrade.sh file..."
echo "Executing post upgrade file..."
chmod +x ${CWDIR}/post_upgrade.sh && ${CWDIR}/post_upgrade.sh
sleep 3
else
echo "No post upgrade changes pending."
fi
sysrc -f ${CWDIR}${EXTCONF} EXTENSION_UPGRADED="0" >/dev/null 2>&1
fi

View File

@@ -90,6 +90,9 @@ if ($_POST) {
$ausgabe = ob_get_contents();
ob_end_clean();
$savemsg .= str_replace("\n", "<br />", $ausgabe)."<br />";
// Silently execute bastille-init post upgrade for pending changes.
// This is to make sure that minor changes are always applied.
exec('bastille-init');
else:
$input_errors[] = gtext('An error has occurred during upgrade process.');
$cmd = sprintf('echo %s: %s An error has occurred during upgrade process. >> %s',$date,$application,$logfile);
@@ -243,8 +246,6 @@ if ($_POST) {
$savemsg .= gtext("ZFS activation option has been skipped.");
endif;
endif;
# Run bastille-init to update config.
exec("bastille-init");
}
if (isset($_POST['restore']) && $_POST['restore']) {

View File

@@ -1 +1 @@
1.2.21
1.2.22