From 435f9a9bd183bbbdaa8a9a18901e88f09e77013d Mon Sep 17 00:00:00 2001 From: Paul Baranowski Date: Tue, 24 May 2011 22:01:53 -0400 Subject: [PATCH] Added version number to backup scripts because if multiple backup scripts are run in sequence it can happen within one second. This means that the first backup of a file would be overwritten with the second backup. --- install/upgrades/airtime-1.8.1/airtime-upgrade.php | 3 ++- install/upgrades/airtime-1.8.2/airtime-upgrade.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/install/upgrades/airtime-1.8.1/airtime-upgrade.php b/install/upgrades/airtime-1.8.1/airtime-upgrade.php index 45eacf77b..a5ca163e7 100644 --- a/install/upgrades/airtime-1.8.1/airtime-upgrade.php +++ b/install/upgrades/airtime-1.8.1/airtime-upgrade.php @@ -236,7 +236,8 @@ function InstallBinaries() exec("cp -R ".$AIRTIME_UTILS." ".CONF_DIR_BINARIES); } -$suffix = date("Ymdhis"); +// Backup the config files +$suffix = date("Ymdhis")."-1.8.1"; foreach ($configFiles as $conf) { if (file_exists($conf)) { echo "Backing up $conf to $conf$suffix.bak".PHP_EOL; diff --git a/install/upgrades/airtime-1.8.2/airtime-upgrade.php b/install/upgrades/airtime-1.8.2/airtime-upgrade.php index ca0e4b046..fb3ec1365 100644 --- a/install/upgrades/airtime-1.8.2/airtime-upgrade.php +++ b/install/upgrades/airtime-1.8.2/airtime-upgrade.php @@ -236,7 +236,7 @@ function InstallBinaries() exec("cp -R ".$AIRTIME_UTILS." ".CONF_DIR_BINARIES); } -$suffix = date("Ymdhis"); +$suffix = date("Ymdhis")."-1.8.2"; foreach ($configFiles as $conf) { if (file_exists($conf)) { echo "Backing up $conf to $conf$suffix.bak".PHP_EOL;