summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-08-16 09:26:28 -0300
committerRenato Botelho <renato@netgate.com>2017-08-16 11:03:04 -0300
commitc241a84f094f385670e7adfc74c931d16c039dfa (patch)
tree851c97b46b99fbda00a4f29afc575658d1fd180e
parentb32e766aad972a7231c549f43356140cd24ad441 (diff)
downloadpfsense-c241a84f094f385670e7adfc74c931d16c039dfa.zip
pfsense-c241a84f094f385670e7adfc74c931d16c039dfa.tar.gz
Detect old workarounds in config upgrade and deal with them
-rw-r--r--src/etc/inc/upgrade_config.inc22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc
index cc21c08..6478a8e 100644
--- a/src/etc/inc/upgrade_config.inc
+++ b/src/etc/inc/upgrade_config.inc
@@ -5075,6 +5075,17 @@ function additional_config_upgrade() {
/* Copy of upgrade_166_to_167 from 2.4 */
if (!isset($already_run['upgrade_166_to_167'])) {
+ /*
+ * If this box was updated during the small period of time
+ * $config latest_version was set to 15.9, reset it to 15.8
+ * so we are sure this upgrade will not be skipped when move
+ * to 2.4
+ */
+
+ if ($config['version'] == "15.9") {
+ $config['version'] = "15.8";
+ }
+
if (strpos($config['widgets']['sequence'],
'netgate_services_and_support') === false) {
$widgets = explode(",", $config['widgets']['sequence']);
@@ -5114,10 +5125,17 @@ function additional_config_upgrade() {
/* Copy of upgrade_168_to_169() from 2.4 */
if (!isset($already_run['upgrade_168_to_169'])) {
+ $found = false;
+
+ /* Detect old temporary workaround */
+ if (isset($config['cron']['rc_update_pkg_metadata'])) {
+ unset($config['cron']['rc_update_pkg_metadata']);
+ $found = true;
+ }
+
$command = '/usr/bin/nice -n20 /etc/rc.update_pkg_metadata';
- $found = false;
- if (is_array($config['cron']['item'])) {
+ if (!$found && is_array($config['cron']['item'])) {
foreach ($config['cron']['item'] as $entry) {
if ($entry['command'] == $command) {
$found = true;
OpenPOWER on IntegriCloud