Changeset 2706
- Timestamp:
- 10/15/06 20:04:33 (7 years ago)
- Files:
-
- freepbx/trunk/install_amp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/trunk/install_amp
r2703 r2706 88 88 out(" --force-version <ver> Force upgrade from version <ver>"); 89 89 out(" --no-files Just run updates without installing files"); 90 out(" --my-svn-is-correct Ignore Asterisk version, assume it is correct"); 91 out(" --engine <name> Use the specified PBX Engine ('asterisk' or 'openpbx')"); 90 92 } 91 93 … … 575 577 // **** Parse out command-line options 576 578 $shortopts = "h?u:p:"; 577 $longopts = array("help","debug","dry-run","username=","password=","force-version=","dbhost=","no-files","dbname=" );579 $longopts = array("help","debug","dry-run","username=","password=","force-version=","dbhost=","no-files","dbname=","my-svn-is-correct","engine"); 578 580 579 581 $args = Console_Getopt::getopt(Console_Getopt::readPHPArgv(), $shortopts, $longopts); … … 587 589 $dryrun = false; 588 590 $install_files = true; 591 $override_astvers = false; 589 592 590 593 //initialize variables to avoid php notices … … 631 634 $install_files = false; 632 635 out("Running upgrade only, without installing files."); 636 break; 637 case "--my-svn-is-correct": 638 $override_astvers = true; 639 break; 640 case "--engine": 641 $pbx_engine = $arg[1]; 642 if ($pbx_engine != 'asterisk') { 643 fatal('Currently only "asterisk" is supported as a PBX engine'); 644 } 633 645 break; 634 646 /* case "--fopwebroot": … … 783 795 if (isset($asterisk_conf['astlogdir'])) { $amp_conf['ASTLOGDIR'] = $asterisk_conf['astlogdir']; } 784 796 797 if (!isset($pbx_engine)) { $pbx_engine='asterisk'; } 798 out("Using $pbx_engine as PBX Engine"); 799 $amp_conf["AMPENGINE"]=$pbx_engine; 800 785 801 write_amportal_conf(AMP_CONF, $amp_conf); 786 802 … … 813 829 } 814 830 out("OK"); 831 } elseif (preg_match('/^Asterisk SVN.+/', $verinfo)) { 832 out("FAIL"); 833 out("*** WARNING ***"); 834 out("You are not using a released version of Asterisk. We are unable to verify"); 835 out("that your Asterisk version is compatible with FreePBX. Whilst this probably"); 836 out("won't cause any problems, YOU NEED TO BE CERTAIN that it is compatible"); 837 out("with at least the released Asterisk version ".REQ_ASTERISK_VERSION."." ); 838 if ($override_astvers==false) { 839 out("If you are SURE that this is compatible, you can re-run ".$argv[0]." with"); 840 out("the parameter --my-svn-is-correct"); 841 exit; 842 } else { 843 out("--my-svn-is-correct specified, continuing"); 844 } 815 845 } else { 816 846 fatal("Could not determine asterisk version (got: \"".$verinfo."\" please report this)");
