From e145be81debcb85cc520910e93d605886a1e6416 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Thu, 24 Nov 2011 17:04:24 -0500 Subject: [PATCH] -fix some minor issue when specifying airtime-install -h --- install_minimal/airtime-install | 4 ++++ install_minimal/include/airtime-installed-check.php | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/install_minimal/airtime-install b/install_minimal/airtime-install index a0f026e32..2ff047857 100755 --- a/install_minimal/airtime-install +++ b/install_minimal/airtime-install @@ -29,6 +29,10 @@ result=$? set -e if [ "$result" -eq "1" ]; then DO_UPGRADE="1" +elif [ "$result" -eq "2" -o "$result" -eq "3" ]; then + exit 1 +elif [ "$result" -eq "4" ]; then + exit 0 fi #make DO_UPGRADE available in sub bash scripts diff --git a/install_minimal/include/airtime-installed-check.php b/install_minimal/include/airtime-installed-check.php index ae2707467..b9b9bd758 100644 --- a/install_minimal/include/airtime-installed-check.php +++ b/install_minimal/include/airtime-installed-check.php @@ -12,6 +12,7 @@ * Returns 1 if a previous version of Airtime installed * Returns 2 if the same version of Airtime is installed * Returns 3 if a version of Airtime that we can't upgrade from is installed. + * Returns 4 if we need to print help message. */ require_once(dirname(__FILE__).'/AirtimeInstall.php'); require_once(__DIR__.'/airtime-constants.php'); @@ -20,12 +21,12 @@ AirtimeInstall::ExitIfNotRoot(); $opts = AirtimeInstall::getOpts(); if ($opts == NULL) { - exit(2); + exit(4); } if (isset($opts->h)) { AirtimeInstall::printUsage($opts); - exit(2); + exit(4); } $version = AirtimeInstall::GetVersionInstalled();