From a84cb7fc3784697f2f5ef9b693192149589b75a6 Mon Sep 17 00:00:00 2001 From: james Date: Fri, 22 Jul 2011 15:32:10 -0400 Subject: [PATCH] CC-2579: Upgrad fails 1.8->1.9 - moved all the config files to each upgrade dir - also fixed back up name of 1.9.0 conifg to 1.9.0(from 1.8.1) --- install_minimal/upgrades/airtime-1.7.0/airtime-upgrade.php | 4 +--- .../upgrades/airtime-1.7.0}/airtime.conf.170 | 0 install_minimal/upgrades/airtime-1.8.0/airtime-upgrade.php | 3 +-- .../upgrades/airtime-1.8.0}/airtime.conf.180 | 0 install_minimal/upgrades/airtime-1.8.1/airtime-upgrade.php | 3 +-- .../upgrades/airtime-1.8.1}/airtime.conf.181 | 0 install_minimal/upgrades/airtime-1.8.2/airtime-upgrade.php | 3 +-- .../upgrades/airtime-1.8.2}/airtime.conf.182 | 0 install_minimal/upgrades/airtime-1.9.0/airtime-upgrade.php | 2 +- 9 files changed, 5 insertions(+), 10 deletions(-) rename {airtime_mvc/build => install_minimal/upgrades/airtime-1.7.0}/airtime.conf.170 (100%) rename {airtime_mvc/build => install_minimal/upgrades/airtime-1.8.0}/airtime.conf.180 (100%) rename {airtime_mvc/build => install_minimal/upgrades/airtime-1.8.1}/airtime.conf.181 (100%) rename {airtime_mvc/build => install_minimal/upgrades/airtime-1.8.2}/airtime.conf.182 (100%) diff --git a/install_minimal/upgrades/airtime-1.7.0/airtime-upgrade.php b/install_minimal/upgrades/airtime-1.7.0/airtime-upgrade.php index 89e157c88..f43e416f7 100644 --- a/install_minimal/upgrades/airtime-1.7.0/airtime-upgrade.php +++ b/install_minimal/upgrades/airtime-1.7.0/airtime-upgrade.php @@ -9,14 +9,12 @@ require_once(dirname(__FILE__).'/../../include/AirtimeIni.php'); require_once(dirname(__FILE__).'/../../include/AirtimeInstall.php'); - /** * This function creates the /etc/airtime configuration folder * and copies the default config files to it. */ function CreateIniFiles() { - global $AIRTIME_SRC; global $AIRTIME_PYTHON_APPS; if (!file_exists("/etc/airtime/")){ @@ -26,7 +24,7 @@ function CreateIniFiles() } } - if (!copy($AIRTIME_SRC."/build/airtime.conf.170", CONF_FILE_AIRTIME)){ + if (!copy("airtime.conf.170", CONF_FILE_AIRTIME)){ echo "Could not copy airtime.conf to /etc/airtime/. Exiting."; exit(1); } diff --git a/airtime_mvc/build/airtime.conf.170 b/install_minimal/upgrades/airtime-1.7.0/airtime.conf.170 similarity index 100% rename from airtime_mvc/build/airtime.conf.170 rename to install_minimal/upgrades/airtime-1.7.0/airtime.conf.170 diff --git a/install_minimal/upgrades/airtime-1.8.0/airtime-upgrade.php b/install_minimal/upgrades/airtime-1.8.0/airtime-upgrade.php index b38f0dde6..897555da6 100644 --- a/install_minimal/upgrades/airtime-1.8.0/airtime-upgrade.php +++ b/install_minimal/upgrades/airtime-1.8.0/airtime-upgrade.php @@ -59,7 +59,6 @@ foreach ($configFiles as $conf) { */ function CreateIniFiles() { - global $AIRTIME_SRC; global $AIRTIME_PYTHON_APPS; if (!file_exists("/etc/airtime/")){ @@ -69,7 +68,7 @@ function CreateIniFiles() } } - if (!copy($AIRTIME_SRC."/build/airtime.conf.180", CONF_FILE_AIRTIME)){ + if (!copy("airtime.conf.180", CONF_FILE_AIRTIME)){ echo "Could not copy airtime.conf to /etc/airtime/. Exiting."; exit(1); } diff --git a/airtime_mvc/build/airtime.conf.180 b/install_minimal/upgrades/airtime-1.8.0/airtime.conf.180 similarity index 100% rename from airtime_mvc/build/airtime.conf.180 rename to install_minimal/upgrades/airtime-1.8.0/airtime.conf.180 diff --git a/install_minimal/upgrades/airtime-1.8.1/airtime-upgrade.php b/install_minimal/upgrades/airtime-1.8.1/airtime-upgrade.php index 46b8f7ebd..dad5f18d1 100644 --- a/install_minimal/upgrades/airtime-1.8.1/airtime-upgrade.php +++ b/install_minimal/upgrades/airtime-1.8.1/airtime-upgrade.php @@ -112,7 +112,6 @@ function LoadConfig($CC_CONFIG) { */ function CreateIniFiles() { - global $AIRTIME_SRC; global $AIRTIME_PYTHON_APPS; if (!file_exists("/etc/airtime/")){ @@ -122,7 +121,7 @@ function CreateIniFiles() } } - if (!copy($AIRTIME_SRC."/build/airtime.conf.181", CONF_FILE_AIRTIME)){ + if (!copy("airtime.conf.181", CONF_FILE_AIRTIME)){ echo "Could not copy airtime.conf to /etc/airtime/. Exiting."; exit(1); } diff --git a/airtime_mvc/build/airtime.conf.181 b/install_minimal/upgrades/airtime-1.8.1/airtime.conf.181 similarity index 100% rename from airtime_mvc/build/airtime.conf.181 rename to install_minimal/upgrades/airtime-1.8.1/airtime.conf.181 diff --git a/install_minimal/upgrades/airtime-1.8.2/airtime-upgrade.php b/install_minimal/upgrades/airtime-1.8.2/airtime-upgrade.php index a19aee382..29d799669 100644 --- a/install_minimal/upgrades/airtime-1.8.2/airtime-upgrade.php +++ b/install_minimal/upgrades/airtime-1.8.2/airtime-upgrade.php @@ -112,7 +112,6 @@ function LoadConfig($CC_CONFIG) { */ function CreateIniFiles() { - global $AIRTIME_SRC; global $AIRTIME_PYTHON_APPS; if (!file_exists("/etc/airtime/")){ @@ -122,7 +121,7 @@ function CreateIniFiles() } } - if (!copy($AIRTIME_SRC."/build/airtime.conf.182", CONF_FILE_AIRTIME)){ + if (!copy("airtime.conf.182", CONF_FILE_AIRTIME)){ echo "Could not copy airtime.conf to /etc/airtime/. Exiting."; exit(1); } diff --git a/airtime_mvc/build/airtime.conf.182 b/install_minimal/upgrades/airtime-1.8.2/airtime.conf.182 similarity index 100% rename from airtime_mvc/build/airtime.conf.182 rename to install_minimal/upgrades/airtime-1.8.2/airtime.conf.182 diff --git a/install_minimal/upgrades/airtime-1.9.0/airtime-upgrade.php b/install_minimal/upgrades/airtime-1.9.0/airtime-upgrade.php index 290e952d2..ca6c1208c 100644 --- a/install_minimal/upgrades/airtime-1.9.0/airtime-upgrade.php +++ b/install_minimal/upgrades/airtime-1.9.0/airtime-upgrade.php @@ -462,7 +462,7 @@ class AirtimeIni{ AirtimeIni::CONF_FILE_LIQUIDSOAP); // Backup the config files - $suffix = date("Ymdhis")."-1.8.1"; + $suffix = date("Ymdhis")."-1.9.0"; foreach ($configFiles as $conf) { if (file_exists($conf)) { echo "Backing up $conf to $conf$suffix.bak".PHP_EOL;