mirror of
https://github.com/JRGTH/xigmanas-bastille-extension.git
synced 2025-12-10 17:00:18 +01:00
Make sure minor changes are always applied
This commit is contained in:
@@ -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
7
bastille-init
Normal file → Executable 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
|
||||
|
||||
@@ -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']) {
|
||||
|
||||
Reference in New Issue
Block a user