[Pkg-voip-commits] r3210 - in freepbx/trunk/debian: . mysql patches rapid sqlite3

Diego Iastrubni elcuco-guest at alioth.debian.org
Thu Mar 8 16:28:38 CET 2007


Author: elcuco-guest
Date: 2007-03-08 15:28:37 +0000 (Thu, 08 Mar 2007)
New Revision: 3210

Added:
   freepbx/trunk/debian/apache/
   freepbx/trunk/debian/apache2/
   freepbx/trunk/debian/astetc/
   freepbx/trunk/debian/freepbx-common.dirs
   freepbx/trunk/debian/freepbx-common.install
   freepbx/trunk/debian/freepbx-common.postinst
   freepbx/trunk/debian/freepbx-common.prerm
   freepbx/trunk/debian/freepbx-mysql.dirs
   freepbx/trunk/debian/freepbx-mysql.install
   freepbx/trunk/debian/freepbx-sqlite3.dirs
   freepbx/trunk/debian/freepbx-sqlite3.install
   freepbx/trunk/debian/mysql/
   freepbx/trunk/debian/mysql/freepbx-install-mysql.sh
   freepbx/trunk/debian/mysql/freepbx-remove-mysql.sh
   freepbx/trunk/debian/rapid/update-freepbx
   freepbx/trunk/debian/sqlite3/
   freepbx/trunk/debian/sqlite3/freepbx-install-sqlite.sh
   freepbx/trunk/debian/sqlite3/freepbx-remove-sqlite.sh
   freepbx/trunk/debian/sqlite3/newinstall.sqlite3.sql
Removed:
   freepbx/trunk/debian/freepbx-admin.dirs
   freepbx/trunk/debian/freepbx-admin.install
   freepbx/trunk/debian/freepbx-admin.postinst
   freepbx/trunk/debian/freepbx-admin.prerm
   freepbx/trunk/debian/rapid/apache/
   freepbx/trunk/debian/rapid/apache2/
   freepbx/trunk/debian/rapid/apply_conf.sh
   freepbx/trunk/debian/rapid/astetc/
   freepbx/trunk/debian/rapid/freepbx-install-mysql.sh
   freepbx/trunk/debian/rapid/freepbx-install-sqlite.sh
   freepbx/trunk/debian/rapid/freepbx-module-status
   freepbx/trunk/debian/rapid/freepbx-remove-mysql.sh
   freepbx/trunk/debian/rapid/freepbx-remove-sqlite.sh
   freepbx/trunk/debian/rapid/newinstall.sqlite3.sql
Modified:
   freepbx/trunk/debian/asterisk-config-freepbx.examples
   freepbx/trunk/debian/asterisk-config-freepbx.install
   freepbx/trunk/debian/asterisk-config-freepbx.postinst
   freepbx/trunk/debian/changelog
   freepbx/trunk/debian/control
   freepbx/trunk/debian/freepbx-panel.postinst
   freepbx/trunk/debian/patches/clean-install-amp.dpatch
   freepbx/trunk/debian/rules
Log:
lets clean up the package a little:

 * freepbx-admin, renamed to freepbx-common
 * freepbx-common now depends on new virtuial package - freepbx-database
 * freepbx-database is provided by freepbx-mysql and freepbx-sqlite3
 * freepbx-{sqlite3,mysql} provide /usr/share/freepbx-common/{install,remove}-db
 * removing code from the rapid directory to the debian direcotry (soon to be removed completely)
 * apply_conf is now /usr/sbin/update-freepbx
 * now a simple "apt-get install freepbx" will bring up apache2. 

TODO:
 * the cgi setup must be tested, i hope i did not break anyuthing
 * the sqlite3 setup must be tested, it "should" work
 * create a pgsql package
 * op-panel package contains a bug, and cannot be removed
 * finish the removal of the rapid directory
 * module_admin should become /usr/sbin/freepbx-module-admin
 * test installation with lighttpd
 * test installation against fastcgi (add support for it in the control files)




Copied: freepbx/trunk/debian/apache (from rev 3208, freepbx/trunk/debian/rapid/apache)

Copied: freepbx/trunk/debian/apache2 (from rev 3208, freepbx/trunk/debian/rapid/apache2)

Modified: freepbx/trunk/debian/asterisk-config-freepbx.examples
===================================================================
--- freepbx/trunk/debian/asterisk-config-freepbx.examples	2007-03-08 10:33:22 UTC (rev 3209)
+++ freepbx/trunk/debian/asterisk-config-freepbx.examples	2007-03-08 15:28:37 UTC (rev 3210)
@@ -1,2 +1,2 @@
 amp_conf/astetc/*
-debian/rapid/astetc/*
+debian/astetc/*

Modified: freepbx/trunk/debian/asterisk-config-freepbx.install
===================================================================
--- freepbx/trunk/debian/asterisk-config-freepbx.install	2007-03-08 10:33:22 UTC (rev 3209)
+++ freepbx/trunk/debian/asterisk-config-freepbx.install	2007-03-08 15:28:37 UTC (rev 3210)
@@ -1,2 +1,2 @@
 amp_conf/astetc/*			etc/asterisk/
-debian/rapid/astetc/*			etc/asterisk/
+debian/astetc/*				etc/asterisk/

Modified: freepbx/trunk/debian/asterisk-config-freepbx.postinst
===================================================================
--- freepbx/trunk/debian/asterisk-config-freepbx.postinst	2007-03-08 10:33:22 UTC (rev 3209)
+++ freepbx/trunk/debian/asterisk-config-freepbx.postinst	2007-03-08 15:28:37 UTC (rev 3210)
@@ -22,7 +22,7 @@
 		# this will take care of adding the users, and 
 		# chmod'ing as needed
 		if [ -x /usr/share/asterisk/bin/asterisk_fix ]; then
-		    /usr/share/asterisk/bin/asterisk_fix
+			/usr/share/asterisk/bin/asterisk_fix
 		fi
 	;;
 	
@@ -41,5 +41,3 @@
 #DEBHELPER#
 
 exit 0
-
-

Copied: freepbx/trunk/debian/astetc (from rev 3208, freepbx/trunk/debian/rapid/astetc)

Modified: freepbx/trunk/debian/changelog
===================================================================
--- freepbx/trunk/debian/changelog	2007-03-08 10:33:22 UTC (rev 3209)
+++ freepbx/trunk/debian/changelog	2007-03-08 15:28:37 UTC (rev 3210)
@@ -7,6 +7,8 @@
     (same for cdr code which was not free by dfsg)
   * Removed obsolete updates from 1.0.10
   * asterisk-sounds-moh-freepbx: files are now *.sln, packaged by upstream
+  * freepbx-common: renamed freepbx-admin
+  * freepbx-admin: apply_conf.sh is now called /usr/sbin/update-freepbx
 
  -- Diego Iastrubni <diego.iastrubni at xorcom.com>  Thu,  8 Mar 2007 11:03:32 +0200
 

Modified: freepbx/trunk/debian/control
===================================================================
--- freepbx/trunk/debian/control	2007-03-08 10:33:22 UTC (rev 3209)
+++ freepbx/trunk/debian/control	2007-03-08 15:28:37 UTC (rev 3210)
@@ -4,14 +4,14 @@
 Maintainer: Debian VoIP Team <pkg-voip-maintainers at lists.alioth.debian.org>
 Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>, Diego Iastrubni <diego.iastrubni at xorcom.com>, Chris Halls <halls at debian.org>
 Build-Depends: debhelper (>= 4.0.0)
-Build-Depends-Indep: sharutils, sox, dpatch
+Build-Depends-Indep: sharutils, dpatch
 Standards-Version: 3.7.2
 XS-Vcs-Svn: svn://svn.debian.org/pkg-voip/
 XS-Vcs-Browser: http://svn.debian.org/wsvn/pkg-voip/
 
 Package: freepbx
 Architecture: all
-Depends: freepbx-admin, freepbx-agi, freepbx-panel, asterisk-sounds-moh-freepbx
+Depends: freepbx-common, freepbx-agi, freepbx-panel, asterisk-sounds-moh-freepbx
 Suggests: ari
 Description: web-based management interface for the Asterisk PBX
  FreePBX (formally AMP) is a web-based GUI for the Asterisk PBX. 
@@ -28,58 +28,9 @@
   * read voicemail via the browser with ARI
  This is a virtual package which will install all the freepbx parts
 
-
-Package: freepbx-apache-mysql
-Architecture: all
-Depends: apache, libapache-mod-php4, mysql-server|virtual-mysql-server, php4-mysql
-Description: FreePBX - apache+mysql support package
- Dummy package to install all packages needed for installing FreePBX 
- with mysql and apache1.
- Please install this package before installing freepbx-admin
-
-Package: freepbx-apache2-mysql
-Architecture: all
-Depends: apache2, libapache2-mod-php4, mysql-server|virtual-mysql-server, php4-mysql, php4-pear
-Description: FreePBX - apache2+mysql support package
- Dummy package to install all packages needed for installing FreePBX with 
- mysql and apache2.
- Please install this package before installing freepbx-admin.
-
-Package: freepbx-apache2-mysql-php5
-Architecture: all
-Depends: apache2, libapache2-mod-php5, mysql-server|virtual-mysql-server, php5-mysql, php-pear
-Description: FreePBX - apache2+mysql5 support package
- Dummy package to install all packages needed for installing FreePBX with 
- mysql5 and apache2.
- Please install this package before installing freepbx-admin.
-
-Package: freepbx-apache2-sqlite3-php5
-Architecture: all
-Depends: apache2, libapache2-mod-php5, sqlite3, php5-sqlite3, php-pear
-Description: FreePBX - apache2+mysql5 support package
- Dummy package to install all packages needed for installing FreePBX with 
- mysql5 and apache2.
- Please install this package before installing freepbx-admin.
-
-Package: freepbx-mathopd-mysql
-Architecture: all
-Depends: mathopd, php4-cgi, mysql-server|virtual-mysql-server, php4-mysql
-Description: FreePBX - mathopd+mysql support package
- Dummy package to install all packages needed for installing FreePBX with 
- mysql and mathopd, using php-cgi.
- Please install this package before installing freepbx-admin.
- 
-Package: freepbx-mathopd-sqlite3
-Architecture: all
-Depends: mathopd, php5-cgi|php4-cgi, sqlite3, php5-sqlite3
-Description: FreePBX - mathopd+sqlite3 support package
- Dummy package to install all packages needed for installing FreePBX with 
- mathopd and sqlite.
- Please install this package before installing freepbx-admin.
-
 Package: asterisk-config-freepbx
 Architecture: all
-Depends: freepbx-agi, asterisk-sounds-main, asterisk-sounds-extra, freepbx-sounds-extra|amportal-sounds-extra|amportal-sounds-extra-links, libapache2-mod-php5|libapache2-mod-php4|php5-cgi|php4-cgi
+Depends: freepbx-agi, asterisk-sounds-main, asterisk-sounds-extra, freepbx-sounds-extra|amportal-sounds-extra|amportal-sounds-extra-links, 
 Recommends: sox
 Provides: asterisk-config-custom
 Replaces: asterisk-config, asterisk-config-amportal
@@ -121,7 +72,7 @@
 
 Package: freepbx-modules
 Architecture: all
-Depends: freepbx-admin, freepbx-module-announcement, freepbx-module-asterisk-cli, freepbx-module-blacklist, freepbx-module-callback, freepbx-module-callforward, freepbx-module-callwaiting, freepbx-module-cidlookup, freepbx-module-conferences, freepbx-module-customerdb, freepbx-module-dictate, freepbx-module-disa, freepbx-module-donotdisturb, freepbx-module-featurecodeadmin, freepbx-module-findmefollow, freepbx-module-gabcast, freepbx-module-infoservices, freepbx-module-inventorydb, freepbx-module-ivr, freepbx-module-logfiles, freepbx-module-manager, freepbx-module-miscapps, freepbx-module-miscdests, freepbx-module-paging, freepbx-module-parking, freepbx-module-pbdirectory, freepbx-module-phonebook, freepbx-module-phpagiconf, freepbx-module-phpinfo, freepbx-module-pinsets, freepbx-module-printextensions, freepbx-module-queues, freepbx-module-recordings, freepbx-module-ringgroups, freepbx-module-speeddial, freepbx-module-timeconditions, freepbx-module-voicemail
+Depends: freepbx-common, freepbx-module-announcement, freepbx-module-asterisk-cli, freepbx-module-blacklist, freepbx-module-callback, freepbx-module-callforward, freepbx-module-callwaiting, freepbx-module-cidlookup, freepbx-module-conferences, freepbx-module-customerdb, freepbx-module-dictate, freepbx-module-disa, freepbx-module-donotdisturb, freepbx-module-featurecodeadmin, freepbx-module-findmefollow, freepbx-module-gabcast, freepbx-module-infoservices, freepbx-module-inventorydb, freepbx-module-ivr, freepbx-module-logfiles, freepbx-module-manager, freepbx-module-miscapps, freepbx-module-miscdests, freepbx-module-paging, freepbx-module-parking, freepbx-module-pbdirectory, freepbx-module-phonebook, freepbx-module-phpagiconf, freepbx-module-phpinfo, freepbx-module-pinsets, freepbx-module-printextensions, freepbx-module-queues, freepbx-module-recordings, freepbx-module-ringgroups, freepbx-module-speeddial, freepbx-module-timeconditions, freepbx-module-voicemail
 Description: FreePBX modules
  This is a meta package which installs all the free modules supplied by
  FreePBX. This package does not provide any file, by it just installs
@@ -144,23 +95,42 @@
  FreePBX. This package does not provide any file, by it just installs
  a bunch of modules.
 
-Package: freepbx-admin
+Package: freepbx-common
 Architecture: all
 Replaces: amportal-common, freepbx-module-core
 Conflicts: amportal-common, freepbx-module-core, freepbx-vmail
-Depends: adduser, asterisk-config-freepbx, asterisk(>= 1.2), apache|apache2|httpd-cgi, libapache-mod-php4|libapache2-mod-php4|libapache2-mod-php5|php5-cgi|php4-cgi, mysql-server|virtual-mysql-server|sqlite3, php-db|php4-pear(<< 4:4.4.0-0), php5-mysql|php4-mysql|php5|sqlite3|php5-sqlite3, php5-cli|php4-cli, php5-pear|php-pear|php4-pear, libdbi-perl
+Depends: adduser, asterisk-config-freepbx, freepbx-database, asterisk(>= 1.2), apache2|apache|httpd-cgi, libapache2-mod-php5|libapache2-mod-php4|libapache-mod-php4|php5-cgi|php4-cgi, php-db|php4-pear(<< 4:4.4.0-0), php5-cli|php4-cli, php5-pear|php-pear|php4-pear, libdbi-perl
 Description: FreePBX administration panel
- FreePBX (formally AMP) is a web-based GUI for Asterisk. 
- This package contains the common files needed for freepbx, as well as 
- the administration parts for Asterisk.
- By default the panel you get is pretty empty. You probably want to install 
+ FreePBX (formally AMP) is a web-based GUI for Asterisk.
+ This package contains the common files needed for freepbx, as well as the
+ administration parts for Asterisk.
+ By default the panel you get is pretty empty. You probably want to install
  some freepbx-modules or only the modules you want.
 
+Package: freepbx-mysql
+Architecture: all
+Depends: mysql5-server-5.0|mysql5-server-4.1|virtual-mysql-server, php5-mysql|php4-mysql
+Provides: freepbx-database
+Conflicts: freepbx-sqlite3
+Replaces: freepbx-sqlite3
+Description: FreePBX - mysql4 support
+ MySQL support for freePBX. Support for MySQL 4.1 and MySQL 5.0. Compatible
+ with PHP4 or PHP5.
+
+Package: freepbx-sqlite3
+Architecture: all
+Depends: sqlite3, php5-sqlite3
+Conflicts: freepbx-mysql
+Replaces: freepbx-mysql
+Provides: freepbx-database
+Description: FreePBX - SQLite3 support
+ SQLite3 support for freePBX. Depende on PHP5 only.
+
 Package: freepbx-panel
 Architecture: all
 Replaces: amportal-panel
 Conflicts: amportal-panel
-Depends: freepbx-admin, perl-base (>=5.6), op-panel (>=0.26.dfsg-5)
+Depends: freepbx-common, perl-base (>=5.6), op-panel (>=0.26.dfsg-5)
 Description: Asterisk Flash operator panel - FreePBX integration
  FreePBX (formally AMP) is a web-based GUI for the Asterisk PBX.
  This package contains the Flash operator panel. The Flash Operator panel is a 

Deleted: freepbx/trunk/debian/freepbx-admin.dirs
===================================================================
--- freepbx/trunk/debian/freepbx-admin.dirs	2007-03-08 10:33:22 UTC (rev 3209)
+++ freepbx/trunk/debian/freepbx-admin.dirs	2007-03-08 15:28:37 UTC (rev 3210)
@@ -1,19 +0,0 @@
-etc/asterisk/manager.d/
-etc/apache/conf.d/
-etc/apache2/conf.d/
-usr/share/asterisk/bin/
-usr/share/freepbx/
-usr/share/freepbx-common/
-usr/share/freepbx-common/sql/
-usr/share/freepbx-common/upgrades/
-usr/share/freepbx-common/upgrades/1.10.010/
-usr/share/freepbx/
-usr/share/freepbx/modules/
-usr/share/freepbx/modules/_cache/
-usr/share/freepbx/i18n/de_DE/
-usr/share/freepbx/i18n/es_ES/
-usr/share/freepbx/i18n/fr_FR/
-usr/share/freepbx/i18n/it_IT/
-var/spool/asterisk/
-var/spool/asterisk/fax/
-var/spool/asterisk/monitor/

Deleted: freepbx/trunk/debian/freepbx-admin.install
===================================================================
--- freepbx/trunk/debian/freepbx-admin.install	2007-03-08 10:33:22 UTC (rev 3209)
+++ freepbx/trunk/debian/freepbx-admin.install	2007-03-08 15:28:37 UTC (rev 3210)
@@ -1,30 +0,0 @@
-debian/rapid/astetc/manager.d/freepbx.conf		etc/asterisk/manager.d/
-amp_conf/bin/*						usr/share/asterisk/bin/
-
-amp_conf/htdocs/admin/*.php				usr/share/freepbx/
-amp_conf/htdocs/admin/i18n/*				usr/share/freepbx/i18n/
-amp_conf/htdocs/admin/common/*.css			usr/share/freepbx/common/
-debian/rapid/mainstyle-alternative.css			usr/share/freepbx/common/
-amp_conf/htdocs/admin/common/*.php			usr/share/freepbx/common/
-amp_conf/htdocs/admin/modules/core			usr/share/freepbx/modules/
-amp_conf/htdocs/admin/images/*.png			usr/share/freepbx/images/
-amp_conf/htdocs/admin/images/*.gif			usr/share/freepbx/images/
-debian/rapid/xorcom-rapid.png				usr/share/freepbx/images/
-debian/rapid/xorcom.png					usr/share/freepbx/images/
-
-
-install_amp						usr/share/freepbx-common/
-debian/rapid/amportal.conf				usr/share/freepbx-common/
-debian/rapid/apply_conf.sh				usr/share/freepbx-common/
-debian/rapid/freepbx-install-*.sh			usr/share/freepbx-common/
-debian/rapid/freepbx-remove-*.sh			usr/share/freepbx-common/
-debian/rapid/freepbx-post-reload			usr/share/freepbx-common/
-debian/rapid/freepbx-enable-all-modules			usr/share/freepbx-common/
-debian/rapid/post-reload/*				usr/share/freepbx-common/post-reload/
-
-SQL/*.sql						usr/share/freepbx-common/sql/
-debian/rapid/newinstall.sqlite3.sql			usr/share/freepbx-common/sql/
-upgrades/*						usr/share/freepbx-common/upgrades/
-
-debian/rapid/apache2					etc/
-debian/rapid/apache					etc/

Deleted: freepbx/trunk/debian/freepbx-admin.postinst
===================================================================
--- freepbx/trunk/debian/freepbx-admin.postinst	2007-03-08 10:33:22 UTC (rev 3209)
+++ freepbx/trunk/debian/freepbx-admin.postinst	2007-03-08 15:28:37 UTC (rev 3210)
@@ -1,150 +0,0 @@
-#! /bin/sh
-# postinst script for freepbx-common
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-#
-
-check_file()
-{
-	filename=$1
-	if [ -e $filename ]; then
-		if grep -q '^[\t ]*extension[\t ]*=[\t ]*mysql\.so' $filename; then 
-			return;
-		fi
-		echo -n "Fixing $filename for mysql support"
-		sed -i -e  's/^;\([ \t]*extension[ \t]*=[ \t]*mysql\.so\)/\1/' $filename
-		echo "."
-	fi
-}
-
-
-case "$1" in
-	configure)
-		# we check only php4, as php5 on etch has other (smarter) tricks
-		# on php4+etch, if this trick is enabled, do not check for this 
-		# at all. 
-		if [ ! -f /etc/php4/conf.d/mysql.ini ]; then
-			check_file "/etc/php4/cgi/php.ini"
-			check_file "/etc/php4/cli/php.ini"
-			check_file "/etc/php4/apache/php.ini"
-			check_file "/etc/php4/apache2/php.ini"
-		fi
-
-#		echo -n "Fixing webroot permissions"
-#		chown -R www-data:www-data /usr/share/freepbx/admin/modules
-#		chmod -R g+rw              /usr/share/freepbx/admin/modules
-
-		# fix log permissions, if not available - create them
-		touch /var/log/asterisk/
-		for i in retrieve opbounce; do j=/var/log/asterisk/freepbx-$i.log; touch $j; chown asterisk:asterisk $j; chmod g+rw $j; done
-
-		# is this an upgrade? or clean install?
-		if [ -e  /etc/amportal.conf ]; then
-			# if you upgarde freepbx from amp you might get a wrong AMPWEBROOT. 
-			# The webroot is part to this package then we fix it by force		
-			# Same for asterisk bin directory
-			echo -n "Fixing /etc/amportal.conf"
-			sed -r -i "s|AMPWEBROOT=[a-zA-Z0-9/]*|AMPWEBROOT=/usr/share/freepbx|" /etc/amportal.conf
-			sed -r -i "s|AMPBIN=[a-zA-Z0-9/]*|AMPBIN=/usr/share/asterisk/bin|" /etc/amportal.conf
-			echo "."
-			
-			# do the updates needed
-			if /usr/share/freepbx-common/install_amp --no-files ; then
-				# if it works, enable the core module
-			        /usr/share/asterisk/bin/module_admin install core || echo "Continuing anyway"
-			else
-				# this may fail for so many reasons... let the user do it itself 
-				# after the package has been installed
-				 echo \
-"Upgrade failed, continuing anyway. Fix your system and execute:
-	/usr/share/freepbx-common/install_amp --no-files
-	
-You may want also to enable the code module using this command 
-(this can be done from the GUI as well):
-	/usr/share/asterisk/bin/module_admin install core
-"
-			fi
-		else
-			# NEW INSTALL
-			cp /usr/share/freepbx-common/amportal.conf /etc/amportal.conf
-		
-			sed -r -i "s|AMPWEBROOT=[a-zA-Z0-9/]*|AMPWEBROOT=/usr/share/freepbx|" /etc/amportal.conf
-			sed -r -i "s|AMPBIN=[a-zA-Z0-9/]*|AMPBIN=/usr/share/asterisk/bin|" /etc/amportal.conf
-			
-			# generate the sql tables
-			MYSQLADMIN=`which mysqladmin` || true
-			if [ -x "$MYSQLADMIN" ]; then
-				echo "Installing FreePBX using a local MySQL server"
-				/usr/share/freepbx-common/freepbx-install-mysql.sh
-			        /usr/share/asterisk/bin/module_admin install core || echo "Continuing anyway"
-			else
-				SQLITE=`which sqlite` || true
-				if [ -x "$SQLITE" ]; then
-					echo "Installing FreePBX using a local SQLite"
-					echo "####### SQLite support added by freepbx-admin.postint"	>> /etc/amportal.conf
-					echo "####### remove lines bellow to use MySQL"			>> /etc/amportal.conf
-					echo "AMPDBENGINE=sqlite"					>> /etc/amportal.conf
-					echo "AMPDBFILE=/var/lib/asterisk/freepbx.sqlite"		>> /etc/amportal.conf
-					/usr/share/freepbx-common/freepbx-install-sqlite.sh
-	        			/usr/share/asterisk/bin/module_admin install core || echo "Continuing anyway"
-				else
-					echo "No suitable SQL server found on this machine."
-					echo "Please edit manually /etc/amportal.conf"
-					
-					exit 1
-				fi
-			fi
-		fi
-		
-		# apply new configuration
-		/usr/share/freepbx-common/apply_conf.sh
-		
-    	        # on fresh installs, we need to modify the www-data user
-		# this might be already done by other packages, or a previous version
-	        # of this package. 
-		# this is ok for the process to fail
-    		if groups www-data | grep -q -w -v asterisk ; then
-	                echo -n "Changing permissions of the web server"
-    		    	    adduser www-data asterisk
-            		echo "."
-
-			# TODO - there must be a generic way of doying this stuff
-    		        echo "Restarting the httpd server to take usage of the new ownership"
-        	        if test -x /etc/init.d/apache ; then /etc/init.d/apache  restart || true; fi
-	                if test -x /etc/init.d/apache2; then /etc/init.d/apache2 restart || true; fi
-    	    	        if test -x /etc/init.d/mathopd; then /etc/init.d/mathopd restart || true; fi
-		else
-			# on upgrages, reloading apache(s) is enough
-        	        if test -x /etc/init.d/apache ; then /etc/init.d/apache  reload || true; fi
-	                if test -x /etc/init.d/apache2; then /etc/init.d/apache2 reload || true; fi
-	        fi
-	;;
-	
-	abort-upgrade|abort-remove|abort-deconfigure)
-	;;
-	
-	*)
-		echo "postinst called with unknown argument \`$1'" >&2
-		exit 1
-	;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0

Deleted: freepbx/trunk/debian/freepbx-admin.prerm
===================================================================
--- freepbx/trunk/debian/freepbx-admin.prerm	2007-03-08 10:33:22 UTC (rev 3209)
+++ freepbx/trunk/debian/freepbx-admin.prerm	2007-03-08 15:28:37 UTC (rev 3210)
@@ -1,52 +0,0 @@
-#! /bin/sh
-# prerm script for ${package_name}
-#
-
-set -e
-
-. /usr/share/debconf/confmodule
-
-# summary of how this script can be called:
-#        * <postrm> `remove'
-#        * <postrm> `purge'
-#        * <old-postrm> `upgrade' <new-version>
-#        * <new-postrm> `failed-upgrade' <old-version>
-#        * <new-postrm> `abort-install'
-#        * <new-postrm> `abort-install' <old-version>
-#        * <new-postrm> `abort-upgrade' <old-version>
-#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-# if [ "$DPKG_DEBUG" = "developer" ]; then
-#     set -x
-# fi
-
-case "$1" in
-	purge)
-		# this may fall, no problems
-		# TODO WTF? this is already gone
- 		/usr/share/freepbx-common/freepbx-remove-mysql.sh || true
- 		/usr/share/freepbx-common/freepbx-remove-sqlite.sh || true
-		
-		rm -f /etc/amportal.conf || true
-	;;
-	
-	remove)
-	;;
-	
-	upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-	;;
-	
-	*)
-		echo "postrm called with unknown argument \`$1'" >&2
-		exit 1
-	;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0

Copied: freepbx/trunk/debian/freepbx-common.dirs (from rev 3208, freepbx/trunk/debian/freepbx-admin.dirs)
===================================================================
--- freepbx/trunk/debian/freepbx-admin.dirs	2007-03-07 15:18:01 UTC (rev 3208)
+++ freepbx/trunk/debian/freepbx-common.dirs	2007-03-08 15:28:37 UTC (rev 3210)
@@ -0,0 +1,20 @@
+etc/asterisk/manager.d/
+etc/apache/conf.d/
+etc/apache2/conf.d/
+usr/sbin/
+usr/share/asterisk/bin/
+usr/share/freepbx/
+usr/share/freepbx-common/
+usr/share/freepbx-common/sql/
+usr/share/freepbx-common/upgrades/
+usr/share/freepbx-common/upgrades/1.10.010/
+usr/share/freepbx/
+usr/share/freepbx/modules/
+usr/share/freepbx/modules/_cache/
+usr/share/freepbx/i18n/de_DE/
+usr/share/freepbx/i18n/es_ES/
+usr/share/freepbx/i18n/fr_FR/
+usr/share/freepbx/i18n/it_IT/
+var/spool/asterisk/
+var/spool/asterisk/fax/
+var/spool/asterisk/monitor/

Copied: freepbx/trunk/debian/freepbx-common.install (from rev 3209, freepbx/trunk/debian/freepbx-admin.install)
===================================================================
--- freepbx/trunk/debian/freepbx-admin.install	2007-03-08 10:33:22 UTC (rev 3209)
+++ freepbx/trunk/debian/freepbx-common.install	2007-03-08 15:28:37 UTC (rev 3210)
@@ -0,0 +1,27 @@
+debian/astetc/manager.d/freepbx.conf			etc/asterisk/manager.d/
+amp_conf/bin/*						usr/share/asterisk/bin/
+
+amp_conf/htdocs/admin/*.php				usr/share/freepbx/
+amp_conf/htdocs/admin/i18n/*				usr/share/freepbx/i18n/
+amp_conf/htdocs/admin/common/*.css			usr/share/freepbx/common/
+debian/rapid/mainstyle-alternative.css			usr/share/freepbx/common/
+amp_conf/htdocs/admin/common/*.php			usr/share/freepbx/common/
+amp_conf/htdocs/admin/modules/core			usr/share/freepbx/modules/
+amp_conf/htdocs/admin/images/*.png			usr/share/freepbx/images/
+amp_conf/htdocs/admin/images/*.gif			usr/share/freepbx/images/
+debian/rapid/xorcom-rapid.png				usr/share/freepbx/images/
+debian/rapid/xorcom.png					usr/share/freepbx/images/
+
+
+install_amp						usr/share/freepbx-common/
+debian/rapid/amportal.conf				usr/share/freepbx-common/
+debian/rapid/freepbx-post-reload			usr/share/freepbx-common/
+debian/rapid/update-freepbx				usr/sbin/
+debian/rapid/freepbx-enable-all-modules			usr/share/freepbx-common/
+debian/rapid/post-reload/*				usr/share/freepbx-common/post-reload/
+
+SQL/*.sql						usr/share/freepbx-common/sql/
+upgrades/*						usr/share/freepbx-common/upgrades/
+
+debian/apache2						etc/
+debian/apache						etc/

Copied: freepbx/trunk/debian/freepbx-common.postinst (from rev 3208, freepbx/trunk/debian/freepbx-admin.postinst)
===================================================================
--- freepbx/trunk/debian/freepbx-admin.postinst	2007-03-07 15:18:01 UTC (rev 3208)
+++ freepbx/trunk/debian/freepbx-common.postinst	2007-03-08 15:28:37 UTC (rev 3210)
@@ -0,0 +1,132 @@
+#! /bin/sh
+# postinst script for freepbx-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+check_file()
+{
+	filename=$1
+	if [ -e $filename ]; then
+		if grep -q '^[\t ]*extension[\t ]*=[\t ]*mysql\.so' $filename; then 
+			return;
+		fi
+		echo -n "Fixing $filename for mysql support"
+		sed -i -e  's/^;\([ \t]*extension[ \t]*=[ \t]*mysql\.so\)/\1/' $filename
+		echo "."
+	fi
+}
+
+
+case "$1" in
+	configure)
+		# we check only php4, as php5 on etch has other (smarter) tricks
+		# on php4+etch, if this trick is enabled, do not check for this 
+		# at all. 
+		if [ ! -f /etc/php4/conf.d/mysql.ini ]; then
+			check_file "/etc/php4/cgi/php.ini"
+			check_file "/etc/php4/cli/php.ini"
+			check_file "/etc/php4/apache/php.ini"
+			check_file "/etc/php4/apache2/php.ini"
+		fi
+
+#		echo -n "Fixing webroot permissions"
+#		chown -R www-data:www-data /usr/share/freepbx/admin/modules
+#		chmod -R g+rw              /usr/share/freepbx/admin/modules
+
+		# fix log permissions, if not available - create them
+		touch /var/log/asterisk/
+		for i in retrieve opbounce; do j=/var/log/asterisk/freepbx-$i.log; touch $j; chown asterisk:asterisk $j; chmod g+rw $j; done
+
+		# is this an upgrade? or clean install?
+		if [ -e  /etc/amportal.conf ]; then
+			# if you upgarde freepbx from amp you might get a wrong AMPWEBROOT. 
+			# The webroot is part to this package then we fix it by force		
+			# Same for asterisk bin directory
+			echo -n "Fixing /etc/amportal.conf"
+			sed -r -i "s|AMPWEBROOT=[a-zA-Z0-9/]*|AMPWEBROOT=/usr/share/freepbx|" /etc/amportal.conf
+			sed -r -i "s|AMPBIN=[a-zA-Z0-9/]*|AMPBIN=/usr/share/asterisk/bin|" /etc/amportal.conf
+			echo "."
+			
+			# do the updates needed
+			if ! /usr/share/freepbx-common/install_amp --no-files ; then
+				# this may fail for so many reasons... let the user do it itself 
+				# after the package has been installed
+				 echo \
+"Upgrade failed, continuing anyway. Fix your system and execute:
+	/usr/share/freepbx-common/install_amp --no-files
+	
+You may want also to enable the code module using this command 
+(this can be done from the GUI as well):
+	/usr/share/asterisk/bin/module_admin install core
+"
+			fi
+		else
+			# NEW INSTALL
+			cp /usr/share/freepbx-common/amportal.conf /etc/amportal.conf
+		
+			sed -r -i "s|AMPWEBROOT=[a-zA-Z0-9/]*|AMPWEBROOT=/usr/share/freepbx|" /etc/amportal.conf
+			sed -r -i "s|AMPBIN=[a-zA-Z0-9/]*|AMPBIN=/usr/share/asterisk/bin|" /etc/amportal.conf
+	                /usr/share/freepbx-common/install-sql
+
+			# if it works, enable the core module
+		        /usr/share/asterisk/bin/module_admin install core || echo "Continuing anyway"
+		fi
+		
+		# apply new configuration
+                update-freepbx
+		
+    	        # on fresh installs, we need to modify the www-data user
+		# this might be already done by other packages, or a previous version
+	        # of this package. 
+		# this is ok for the process to fail
+    		if groups www-data | grep -q -w -v asterisk ; then
+	                echo -n "Changing permissions of the web server"
+				adduser www-data asterisk
+            		echo "."
+
+			# TODO - there must be a generic way of doying this stuff
+    		        echo "Restarting the httpd server to take usage of the new ownership"
+			for i in apache apache2 mathopd lighttpd; do
+				if test -x /etc/init.d/$i; then
+					invoke-rc.d $i restart
+				fi
+			done
+		else
+			# on upgrages, reloading apache(s) is enough
+			for i in apache apache2 mathopd ; do
+				if test -x /etc/init.d/$i; then
+					invoke-rc.d $i reload
+				fi
+			done
+	        fi
+	;;
+	
+	abort-upgrade|abort-remove|abort-deconfigure)
+	;;
+	
+	*)
+		echo "postinst called with unknown argument \`$1'" >&2
+		exit 1
+	;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0

Copied: freepbx/trunk/debian/freepbx-common.prerm (from rev 3208, freepbx/trunk/debian/freepbx-admin.prerm)
===================================================================
--- freepbx/trunk/debian/freepbx-admin.prerm	2007-03-07 15:18:01 UTC (rev 3208)
+++ freepbx/trunk/debian/freepbx-common.prerm	2007-03-08 15:28:37 UTC (rev 3210)
@@ -0,0 +1,50 @@
+#! /bin/sh
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+# if [ "$DPKG_DEBUG" = "developer" ]; then
+#     set -x
+# fi
+
+case "$1" in
+	purge)
+		# this may fall, no problems
+ 		/usr/share/freepbx-common/remove-sql || true
+		
+		rm -f /etc/amportal.conf || true
+	;;
+	
+	remove)
+	;;
+	
+	upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+	;;
+	
+	*)
+		echo "postrm called with unknown argument \`$1'" >&2
+		exit 1
+	;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0

Added: freepbx/trunk/debian/freepbx-mysql.dirs
===================================================================
--- freepbx/trunk/debian/freepbx-mysql.dirs	2007-03-08 10:33:22 UTC (rev 3209)
+++ freepbx/trunk/debian/freepbx-mysql.dirs	2007-03-08 15:28:37 UTC (rev 3210)
@@ -0,0 +1 @@
+usr/share/freepbx-common/

Added: freepbx/trunk/debian/freepbx-mysql.install
===================================================================
--- freepbx/trunk/debian/freepbx-mysql.install	2007-03-08 10:33:22 UTC (rev 3209)
+++ freepbx/trunk/debian/freepbx-mysql.install	2007-03-08 15:28:37 UTC (rev 3210)
@@ -0,0 +1,2 @@
+debian/mysql/freepbx-install-mysql.sh		usr/share/freepbx-common/
+debian/mysql/freepbx-remove-mysql.sh		usr/share/freepbx-common/

Modified: freepbx/trunk/debian/freepbx-panel.postinst
===================================================================
--- freepbx/trunk/debian/freepbx-panel.postinst	2007-03-08 10:33:22 UTC (rev 3209)
+++ freepbx/trunk/debian/freepbx-panel.postinst	2007-03-08 15:28:37 UTC (rev 3210)
@@ -32,7 +32,7 @@
             		--slave /etc/op-panel/op_style.cfg   op-style-cfg   /etc/op-panel/freepbx/op_style.cfg
 
 		# make the op-panel aware of the new configuration
-		/usr/share/freepbx-common/apply_conf.sh
+		update-freepbx
 		;;
 
 	abort-upgrade|abort-remove|abort-deconfigure)

Added: freepbx/trunk/debian/freepbx-sqlite3.dirs
===================================================================
--- freepbx/trunk/debian/freepbx-sqlite3.dirs	2007-03-08 10:33:22 UTC (rev 3209)
+++ freepbx/trunk/debian/freepbx-sqlite3.dirs	2007-03-08 15:28:37 UTC (rev 3210)
@@ -0,0 +1 @@
+usr/share/freepbx-common/

Added: freepbx/trunk/debian/freepbx-sqlite3.install
===================================================================
--- freepbx/trunk/debian/freepbx-sqlite3.install	2007-03-08 10:33:22 UTC (rev 3209)
+++ freepbx/trunk/debian/freepbx-sqlite3.install	2007-03-08 15:28:37 UTC (rev 3210)
@@ -0,0 +1,2 @@
+debian/sqlite3/freepbx-install-sqlite.sh		usr/share/freepbx-common/
+debian/sqlite3/freepbx-remove-sqlite.sh			usr/share/freepbx-common/

Copied: freepbx/trunk/debian/mysql/freepbx-install-mysql.sh (from rev 3208, freepbx/trunk/debian/rapid/freepbx-install-mysql.sh)

Copied: freepbx/trunk/debian/mysql/freepbx-remove-mysql.sh (from rev 3208, freepbx/trunk/debian/rapid/freepbx-remove-mysql.sh)

Modified: freepbx/trunk/debian/patches/clean-install-amp.dpatch
===================================================================
--- freepbx/trunk/debian/patches/clean-install-amp.dpatch	2007-03-08 10:33:22 UTC (rev 3209)
+++ freepbx/trunk/debian/patches/clean-install-amp.dpatch	2007-03-08 15:28:37 UTC (rev 3210)
@@ -11,10 +11,10 @@
 ## DP: dpkg.
 
 @DPATCH@
-diff -urNad upstream~/install_amp upstream/install_amp
---- upstream~/install_amp	2007-01-04 23:29:08.000000000 +0200
-+++ upstream/install_amp	2007-01-14 16:51:08.000000000 +0200
-@@ -93,7 +93,7 @@
+diff -urNad freepbx-2.2.1~dfsg~/install_amp freepbx-2.2.1~dfsg/install_amp
+--- freepbx-2.2.1~dfsg~/install_amp	2007-02-07 02:40:46.000000000 +0200
++++ freepbx-2.2.1~dfsg/install_amp	2007-03-08 17:05:20.000000000 +0200
+@@ -94,7 +94,7 @@
  	out("  --debug                  Enable debug output");
  	out("  --dry-run                Don't actually do anything");
  	out("  --force-version <ver>    Force upgrade from version <ver>");
@@ -23,7 +23,7 @@
  	out("  --install-moh            Install default music-on-hold files (normally doesn't, unless ");
  	out("                           it's a new installation)");
  	out("  --my-svn-is-correct      Ignore Asterisk version, assume it is correct");
-@@ -241,7 +241,7 @@
+@@ -242,7 +242,7 @@
  	return ($retVal != 0);
  }
  
@@ -32,7 +32,7 @@
  	debug("mkdir ".$directory.", ".$mode);
  	$ntmp = sscanf($mode,"%o",$modenum); //assumes all inputs are octal
  	if (version_compare(phpversion(), 5.0) < 0) {
-@@ -250,6 +250,7 @@
+@@ -251,6 +251,7 @@
  			$output = false;
  			$return_value = false;
  			exec("mkdir -m ".$mode." -p ".$directory,  $output, $return_value);
@@ -40,7 +40,7 @@
  			return ($return_value == 0);
  		} else {
  			return mkdir($directory, $modenum);
-@@ -311,7 +312,7 @@
+@@ -312,7 +313,7 @@
  			if (is_dir($source)) {
  				if (!file_exists($destination)) {
  					if ((!$dryrun) && ($destination != "")) {
@@ -49,7 +49,7 @@
  					}
  				}
  			}
-@@ -528,13 +529,13 @@
+@@ -529,13 +530,13 @@
  	else $amp_conf["AMPMGRPASS"] = $key;
  	
  	do {
@@ -66,7 +66,7 @@
  			out("Created ".$amp_conf["AMPWEBROOT"]);
  			break;
  		} else {
-@@ -561,13 +562,13 @@
+@@ -562,13 +563,13 @@
  	else $amp_conf["AMPEXTENSIONS"] = $key;
  	
  	do {
@@ -83,7 +83,7 @@
  			out("Created ".$amp_conf["AMPBIN"]);
  			break;
  		} else {
-@@ -582,7 +583,7 @@
+@@ -583,7 +584,7 @@
  		else $amp_conf["AMPSBIN"] = rtrim($key,'/');
  		if (is_dir($amp_conf["AMPSBIN"])) {
  			break;
@@ -92,7 +92,7 @@
  			out("Created ".$amp_conf["AMPSBIN"]);
  			break;
  		} else {
-@@ -612,7 +613,7 @@
+@@ -613,7 +614,7 @@
  outn("Checking for PEAR DB..");
  if (! @ include('DB.php')) {
  	out("FAILED");
@@ -101,7 +101,7 @@
  }
  out("OK");
  
-@@ -621,7 +622,7 @@
+@@ -622,7 +623,7 @@
  outn("Checking for PEAR Console::Getopt..");
  if (! @ include("Console/Getopt.php")) {
  	out("FAILED");
@@ -110,7 +110,7 @@
  }
  out("OK");
  
-@@ -638,7 +639,7 @@
+@@ -639,7 +640,7 @@
  
  $debug = false;
  $dryrun = false;
@@ -119,7 +119,7 @@
  $override_astvers = false;
  
  $install_moh = false;
-@@ -687,6 +688,10 @@
+@@ -688,6 +689,10 @@
  			$install_files = false;
  			out("Running upgrade only, without installing files.");
  		break;
@@ -130,7 +130,7 @@
  		case "--my-svn-is-correct":
  			$override_astvers = true;
  		break;
-@@ -755,7 +760,7 @@
+@@ -756,7 +761,7 @@
  if (!file_exists(AMP_CONF)) {
  	out(AMP_CONF." does not exist, copying default");
  	copy("amportal.conf", AMP_CONF);
@@ -139,7 +139,7 @@
  	collect_settings(AMP_CONF, $dbhost, $new_username, $new_password, 'asterisk');
  
  	out("Assuming new install, --install-moh added to command line");
-@@ -776,7 +781,7 @@
+@@ -777,7 +782,7 @@
  
  if (!array_key_exists("AMPWEBROOT",$amp_conf)) {
  	out("Adding AMPWEBROOT option to amportal.conf - using AMP default");
@@ -148,7 +148,7 @@
  }
  
  if (!array_key_exists("FOPWEBROOT",$amp_conf)) {
-@@ -786,7 +791,7 @@
+@@ -787,7 +792,7 @@
  
  if (!array_key_exists("AMPBIN",$amp_conf)) {
  	out("Adding AMPBIN option to amportal.conf - using AMP default");
@@ -157,7 +157,7 @@
  }
  
  if (!array_key_exists("AMPSBIN",$amp_conf)) {
-@@ -822,7 +827,7 @@
+@@ -823,7 +828,7 @@
  // write amportal.conf
  write_amportal_conf(AMP_CONF, $amp_conf);
  
@@ -166,7 +166,7 @@
  
  outn("Checking for ".ASTERISK_CONF."..");
  if (!file_exists(ASTERISK_CONF)) {
-@@ -845,7 +850,8 @@
+@@ -846,7 +851,8 @@
     
     this code will stay in 2.2, but in 2.3 it will be gone. developers - please
     update your code
@@ -176,7 +176,7 @@
  if (isset($asterisk_conf['astetcdir'])) { $amp_conf['ASTETCDIR'] = $asterisk_conf['astetcdir']; }
  if (isset($asterisk_conf['astmoddir'])) { $amp_conf['ASTMODDIR'] = $asterisk_conf['astmoddir']; }
  if (isset($asterisk_conf['astvarlibdir'])) { $amp_conf['ASTVARLIBDIR'] = $asterisk_conf['astvarlibdir']; }
-@@ -853,6 +859,7 @@
+@@ -854,6 +860,7 @@
  if (isset($asterisk_conf['astspooldir'])) { $amp_conf['ASTSPOOLDIR'] = $asterisk_conf['astspooldir']; }
  if (isset($asterisk_conf['astrundir'])) { $amp_conf['ASTRUNDIR'] = $asterisk_conf['astrundir']; }
  if (isset($asterisk_conf['astlogdir'])) { $amp_conf['ASTLOGDIR'] = $asterisk_conf['astlogdir']; }
@@ -184,7 +184,7 @@
  
  if (!isset($pbx_engine)) { $pbx_engine='asterisk'; }
  out("Using $pbx_engine as PBX Engine");
-@@ -868,13 +875,16 @@
+@@ -869,13 +876,16 @@
  if ($exitcode != 0) {
  	fatal("Error executing asterisk: be sure Asterisk is installed and in the path");
  }
@@ -202,7 +202,7 @@
  
  
  // normally this would be the contents of ASTETCDIR/version, but this is for simplicity, as we just read it above
-@@ -943,7 +953,7 @@
+@@ -944,7 +954,7 @@
  		// datasource in in this style: dbengine://username:password@host/database 
  		if (!function_exists($db_engine.'_connect')) {
  			out("FAILED");
@@ -211,7 +211,7 @@
  		}
  	
  		$datasource = $db_engine.'://'.$db_user.':'.$db_pass.'@'.$db_host.'/'.$db_name;
-@@ -1009,7 +1019,7 @@
+@@ -1010,37 +1020,23 @@
  	$md5sums = read_md5_file(UPGRADE_DIR."/".$version.".md5");
  	recursive_copy("amp_conf", "", $md5sums);
  	if (!is_file("/etc/asterisk/voicemail.conf")) copy("/etc/asterisk/voicemail.conf.template","/etc/asterisk/voicemail.conf");
@@ -220,13 +220,15 @@
  	out("OK");
  }
  
-@@ -1017,29 +1027,15 @@
- debug("Running ".dirname(__FILE__)."/apply_conf.sh");
+ // **** Apply amportal.conf configuration to files
+-debug("Running ".dirname(__FILE__)."/apply_conf.sh");
++debug("Running /usr/sbin/update-freepbx");
  outn("Configuring install for your environment..");
  if (!$dryrun) {
 -	if (file_exists($amp_conf["AMPSBIN"]."/amportal"))
 -		exec("chmod u+x ".$amp_conf["AMPSBIN"]."/amportal");
- 	exec(dirname(__FILE__)."/apply_conf.sh");
+-	exec(dirname(__FILE__)."/apply_conf.sh");
++	exec("/usr/sbin/update-freepbx");
  }
  out("OK");
  
@@ -252,7 +254,7 @@
  
  
  // **** Read upgrades/ directory
-@@ -1077,19 +1073,24 @@
+@@ -1078,19 +1074,24 @@
  out("Generating AMP configs..OK");
  
  // **** Bounce FOP

Deleted: freepbx/trunk/debian/rapid/apply_conf.sh
===================================================================
--- freepbx/trunk/debian/rapid/apply_conf.sh	2007-03-08 10:33:22 UTC (rev 3209)
+++ freepbx/trunk/debian/rapid/apply_conf.sh	2007-03-08 15:28:37 UTC (rev 3210)
@@ -1,94 +0,0 @@
-#!/bin/sh
-
-# this file is a fork of the original AMP script
-# the original script is GPL, as AMP itself.
-#
-
-# changes:
-#  30-4-2006:  When writein the email information, try to find an address "by force"
-#   8-3-2006:  This script not modifies /etc/asterisk/manager.d/freepbx.conf instead of gloabal config file
-#              - Diego Iastrubni <diego.iastrubni at xorcom.com>
-#  1-12-2005:  dialparties.agi is no longer patched
-#              patch the hostname for the DB in cdr_mysql.conf
-#              removed the patching of retrieve_*.pl
-#              - Diego Iastrubni <diego.iastrubni at xorcom.com>
-#  22-11-2005: copyrights...
-#              I see that along the way I added again the modification of the perl scripts...
-#              - Diego Iastrubni <diego.iastrubni at xorcom.com>
-#  27-9-2005:  fixed path for op-panel (again, was on web-root, now on /etc)
-#              sanity checks (maybe op-panel is not installed at all?)
-#              - Diego Iastrubni <diego.iastrubni at xorcom.com>
-#   5-9-2005:  more verbose printings
-#              removed the modification of the perl scripts, as they read the config them selves
-#              - Diego Iastrubni <diego.iastrubni at xorcom.com>
-
-if [ "$1" == "-h" ] ; then
-	echo "Usage: "
-	echo "   $0 [config]"
-	echo
-	echo "If config file is not specified, default is /etc/amportal.conf"
-	echo
-	exit
-fi
-
-if [ -n "$1" ] ; then
-	AMPCONFIG=$1
-else
-	AMPCONFIG=/etc/amportal.conf
-fi
-
-if [ ! -e $AMPCONFIG ] ; then
-	echo "Cannot find $AMPCONFIG"
-	exit
-fi
-
-# include config file
-echo " - Reading $AMPCONFIG"
-source $AMPCONFIG
-
-
-echo " - Updating configuration..."
-
-echo -n " - Updating /etc/asterisk/cdr_mysql.conf"
-sed -r -i "s/user=[a-zA-Z0-9]*/user=$AMPDBUSER/" /etc/asterisk/cdr_mysql.conf
-sed -r -i "s/password=[a-zA-Z0-9]*/password=$AMPDBPASS/" /etc/asterisk/cdr_mysql.conf
-sed -r -i "s/hostname=[a-zA-Z0-9]*/hostname=$AMPDBHOST/" /etc/asterisk/cdr_mysql.conf
-echo "."
-
-echo -n " - Updating /etc/asterisk/manager.d/freepbx.conf"
-sed -r -i "s|\[[a-zA-Z0-9]+\]|[$AMPMGRUSER]|"					/etc/asterisk/manager.d/freepbx.conf
-sed -r -i "s|[ \t]*secret[ \t]*=[ \t]*[a-zA-Z0-9_]*|secret = $AMPMGRPASS|"	/etc/asterisk/manager.d/freepbx.conf
-
-echo "."
-
-# if no address supplied in amportal.conf, get it from eth0. We must have a valid IP
-# for sending emails no?
-if [ "x$AMPWEBADDRESS" == "x" ]; then
-    WEBADDRESS=`/sbin/ifconfig eth0 | grep 'inet addr:' | sed 's/addr://' | awk '{ print $2 }'`
-else
-    WEBADDRESS=$AMPWEBADDRESS
-fi
-echo " - Updating /etc/asterisk/vm_email.inc (may require manual check)..."
-sed -i -e "s|http://[\\w\\d]*/|http://$WEBADDRESS/|g" /etc/asterisk/vm_email.inc
-
-
-if [ -e /etc/op-panel/freepbx/op_server.cfg ] ; then
-	echo -n " - Updating op-panel"
-	sed -r -i "s/manager_user=[a-zA-Z0-9]*/manager_user=$AMPMGRUSER/"           /etc/op-panel/freepbx/op_server.cfg
-	sed -r -i "s/manager_secret=[a-zA-Z0-9]*/manager_secret=$AMPMGRPASS/"       /etc/op-panel/freepbx/op_server.cfg
-	sed -r -i "s/web_hostname=[a-zA-Z0-9_.-]*/web_hostname=$AMPWEBADDRESS/"   /etc/op-panel/freepbx/op_server.cfg
-	sed -r -i "s/security_code=[a-zA-Z0-9]*/security_code=$FOPPASSWORD/"        /etc/op-panel/freepbx/op_server.cfg
-	sed -r -i "s!flash_dir=[a-zA-Z0-9_./\-]*!flash_dir=$AMPWEBROOT\/panel!" /etc/op-panel/freepbx/op_server.cfg
-	sed -r -i "s!web_hostname=[a-zA-Z0-9.]*!web_hostname=$AMPWEBADDRESS!"      /etc/op-panel/freepbx/op_server.cfg
-	echo "."
-	
-	# we might find situations in which there is no file operator panel installed
-	if [ -x /etc/init.d/op-panel ] ; then
-        	invoke-rc.d op-panel restart
-	fi
-else
-	echo " - Ignoring op-panel configuration"
-fi
-/etc/init.d/asterisk reload
-
-echo "Done"

Deleted: freepbx/trunk/debian/rapid/freepbx-install-mysql.sh
===================================================================
--- freepbx/trunk/debian/rapid/freepbx-install-mysql.sh	2007-03-08 10:33:22 UTC (rev 3209)
+++ freepbx/trunk/debian/rapid/freepbx-install-mysql.sh	2007-03-08 15:28:37 UTC (rev 3210)
@@ -1,105 +0,0 @@
-#!/bin/sh
-
-#   Written by Tzafrir Cohen <tzafrir.cohen at xorcom.com>, 
-#              Diego Iastrubni <diego.iastrubni at xorcom.com>
-#   Copyright (C) 2005, Xorcom
-#  
-#   All rights reserved.
-#  
-#   This program is free software; you can redistribute it and/or modify
-#   it under the terms of the GNU General Public License as published by
-#   the Free Software Foundation; either version 2 of the License, or
-#   (at your option) any later version.
-#  
-#   This program is distributed in the hope that it will be useful,
-#   but WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#   GNU General Public License for more details.
-#  
-#   You should have received a copy of the GNU General Public License
-#   along with this program; if not, write to the Free Software
-#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# a small script to generate the needed SQL tables by AMPortal
-
-
-# quoted from the daily cron of mysql:
-MYSQL="mysql --defaults-extra-file=/etc/mysql/debian.cnf"
-MYSQLADMIN="mysqladmin --defaults-extra-file=/etc/mysql/debian.cnf"
-SQLDIR=/usr/share/freepbx-common/sql
-SQL_HOST=localhost
-
-DEF_ADMIN_USER="admin"
-DEF_ADMIN_PASSWD="admin"
-
-# if you do not want this script to fill the databases with the default
-# values, set the environment variable CLEANDB to "1":
-# 	CLEANDB=1 /usr/share/freepbx-common/freepbx-install-db
-# by default, it will create the tables with the default values from 
-# freepbx
-
-CLEANDB=${CLEANDB:-0}
-
-exec_command()
-{
-	CMD=$1
-	$CMD
-}
-
-create_db()
-{
-	DB=$1
-	DB_USER=$2
-	DB_PASSWD=$3
-	SQL_INPUT=$4
-
-	if [ ! -d /var/lib/mysql/$DB ]; then
-		exec_command "$MYSQLADMIN create $DB";
-	fi
-
-        CMD="GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER  ON $DB.* TO $DB_USER@$SQL_HOST IDENTIFIED BY '$DB_PASSWD';"
-# 	echo $CMD
-	echo $CMD | $MYSQL mysql
-
-	
-	if [ $CLEANDB != "1" ]; then
-		# in case this breaks in the middle, we need to still be able
-		# to run everything. So we need to prevent failed INSERTs from
-		# bumping the whole process
-		perl -n -e 'unless (/INSERT/ .. /[;]/){print}' $SQL_INPUT | $MYSQL $DB
-		perl -n -e 'if (/INSERT/ .. /[;]/){s/\n//; s/;/\n/; print}' $SQL_INPUT \
-			| while read new_insert_line
-				# insert this line if it has not been already inserted.
-				# TODO: update if an insert has failed?
-				do echo $new_insert_line | $MYSQL $DB &>/dev/null || true
-			done
-	fi
-}
-
-if [ ! -f /etc/amportal.conf ]; then
-	echo "amportal configuration not found, please install amportal.conf"
-	echo "	cp /usr/share/freepbx-common/amportal.conf /etc/amportal.conf"
-	echo "Modify it to your needs and run this script again."
-	exit 1
-fi
-
-. /etc/amportal.conf
-
-if [ "xxx$AMPDBUSER" == "xxx" ]; then
-	echo "AMPDBUSER is not configured on /etc/amportal.conf"                   >&2
-	echo "please update configuration and run /usr/share/freepbx-common/apply_conf.sh" >&2
-	exit 1
-fi
-
-if [ "xxx$AMPDBPASS" == "xxx" ]; then
-	echo "AMPDBPASS is not configured on /etc/amportal.conf"                   >&2
-	echo "please update configuration and run /usr/share/freepbx-common/apply_conf.sh" >&2
-	exit 1
-fi
-
-echo "creating asterisk DB"
-create_db "asterisk" "$AMPDBUSER" "$AMPDBPASS" "$SQLDIR/newinstall.sql"
-
-echo "creating asteriskcdr DB"
-create_db "asteriskcdrdb" "$AMPDBUSER" "$AMPDBPASS" "$SQLDIR/cdr_mysql_table.sql"
-

Deleted: freepbx/trunk/debian/rapid/freepbx-install-sqlite.sh
===================================================================
--- freepbx/trunk/debian/rapid/freepbx-install-sqlite.sh	2007-03-08 10:33:22 UTC (rev 3209)
+++ freepbx/trunk/debian/rapid/freepbx-install-sqlite.sh	2007-03-08 15:28:37 UTC (rev 3210)
@@ -1,58 +0,0 @@
-#!/bin/sh
-
-#   Written by Diego Iastrubni <diego.iastrubni at xorcom.com>
-#   Copyright (C) 2006, Xorcom
-#  
-#   All rights reserved.
-#  
-#   This program is free software; you can redistribute it and/or modify
-#   it under the terms of the GNU General Public License as published by
-#   the Free Software Foundation; either version 2 of the License, or
-#   (at your option) any later version.
-#  
-#   This program is distributed in the hope that it will be useful,
-#   but WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#   GNU General Public License for more details.
-#  
-#   You should have received a copy of the GNU General Public License
-#   along with this program; if not, write to the Free Software
-#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# a small script for generating SQLite tables for freepbx
-
-DEF_ADMIN_USER="admin"
-DEF_ADMIN_PASSWD="admin"
-
-if [ ! -f /etc/amportal.conf ]; then
-	echo "amportal configuration not found, please install amportal.conf"
-	echo "	cp /usr/share/freepbx-common/amportal.conf /etc/amportal.conf"
-	echo "Modify it to your needs and run this script again."
-	exit 1
-fi
-
-. /etc/amportal.conf
-
-if [ "$AMPDBENGINE" != "sqlite" ]; then
-	echo "freePBX is not configured to work with SQLite"
-	echo "Plese edit /etc/amportal.conf to your needs and run this script again"
-	exit 1
-fi
-
-if [ "x$AMPDBFILE" == "x" ]; then
-	echo "No database file is configured in /etc/amportal.conf"
-	echo "Plese edit /etc/amportal.conf to your needs and run this script again"
-	exit 1
-fi
-
-AMPDBDIR=`dirname $AMPDBFILE`
-
-mkdir -p $AMPDBDIR
-touch $AMPDBFILE
-chown asterisk.asterisk $AMPDBFILE
-chmod 660 $AMPDBFILE
-
-
-echo "creating asterisk DB at $AMPDBFILE"
-cat /usr/share/freepbx-common/sql/newinstall.sqlite.sql | sqlite $AMPDBFILE
-

Deleted: freepbx/trunk/debian/rapid/freepbx-module-status
===================================================================
--- freepbx/trunk/debian/rapid/freepbx-module-status	2007-03-08 10:33:22 UTC (rev 3209)
+++ freepbx/trunk/debian/rapid/freepbx-module-status	2007-03-08 15:28:37 UTC (rev 3210)
@@ -1,351 +0,0 @@
-#!/usr/bin/php -q
-
-<?php
-
-#   Written by Diego Iastrubni <diego.iastrubni at xorcom.com>
-#              (many parts borroed from different freePBX pages)
-#   Copyright (C) 2006, Xorcom
-#  
-#   All rights reserved.
-#  
-#   This program is free software; you can redistribute it and/or modify
-#   it under the terms of the GNU General Public License as published by
-#   the Free Software Foundation; either version 2 of the License, or
-#   (at your option) any later version.
-#  
-#   This program is distributed in the hope that it will be useful,
-#   but WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#   GNU General Public License for more details.
-#  
-#   You should have received a copy of the GNU General Public License
-#   along with this program; if not, write to the Free Software
-#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# a small script for managing installed modules
-# from the shell.
-# can basiacally do everything that the WEB GUI can do,
-# besides downloading new updates - it only works on local 
-# modules. updates will be done using apt-get.
-
-define("AMP_CONF"    , "/etc/amportal.conf");
-define("FREEPBX_PATH", "/usr/share/freepbx/");
-
-$dryrun  = false;
-$debug   = false;
-$verbose = false;
-
-function out( $s)
-{
-	global $verbose;
-	
-	if ($verbose)
-		print( $s );
-}
-
-function outn( $s)
-{
-	global $verbose;
-	
-	if ($verbose)
-		print( "$s\n" );
-}
-
-function debug( $s)
-{
-	global $debug;
-	
-	if ($debug)
-		print( "DEBUG: $s\n" );
-}
-
-function exec_cmd( $cmd )
-{
-	debug(" executing $cmd ");
-	system( $cmd, $ret_val );
-	return $ret_val;
-}
-
-function showHelp()
-{
-	print( "Module install/uninstall needs a parameter 
-	install, enable, uninstall, disable, status, st
-	You can also use the --debug (-d) and --verbose (-v) switches to get more information.
-\n");
-}
-
-// -------------------------------------------------
-// working with modules, taken from page.modules.php
-// -------------------------------------------------
-function disableModule($modname) 
-{
-	global $db;
-	$sql = "UPDATE modules SET enabled = 0 WHERE modulename = '{$modname}'";
-	$results = $db->query($sql);
-	if(DB::IsError($results)) {
-		die($results->getMessage());
-	}
-}
-
-function uninstallModule($modname) {
-	global $db;
-	$sql = "DELETE FROM modules WHERE modulename = '{$modname}'";
-	$results = $db->query($sql);
-	if(DB::IsError($results)) {
-		die($results->getMessage());
-	}
-}
-
-function enableModule($modname) {
-	global $db;
-	$sql = "UPDATE modules SET enabled = 1 WHERE modulename = '{$modname}'";
-	$results = $db->query($sql);
-	if(DB::IsError($results)) {
-		die($results->getMessage());
-	}
-}
-
-function installModule($modname,$modversion) 
-{
-	global $db;
-	global $amp_conf;
-	
-	switch ($amp_conf["AMPDBENGINE"])
-	{
-		case "sqlite":
-			// to support sqlite2, we are not using autoincrement. we need to find the 
-			// max ID available, and then insert it
-			$sql = "SELECT max(id) FROM modules;";
-			$results = $db->getRow($sql);
-			$new_id = $results[0];
-			$new_id ++;
-			$sql = "INSERT INTO modules (id,modulename, version,enabled) values ('{$new_id}','{$modname}','{$modversion}','0' );";
-			break;
-		
-		default:
-			$sql = "INSERT INTO modules (modulename, version) values ('{$modname}','{$modversion}');";
-		break;
-	}
-
-	$results = $db->query($sql);
-	if(DB::IsError($results)) {
-		die($results->getMessage());
-	}
-}
-
-// -----------------------------------------------
-// internal functions
-// -----------------------------------------------
-
-// show_modules_status( $online_modules, $local_modules );
-function show_modules_status( $local_modules )
-{
-	debug( "found ". count($local_modules) . " modules" );
-	
-	printf("I - installed, U - uninstalled, E - enabled, D - disabled, P - need install \n\n");
-	foreach( $local_modules as $module )
-	{
-		switch( $module["status"] )
-		{
-			case 0: // uninstalled
-				$status = "U";
-				break;
-			case 1: // disabled
-				$status = "D";
-				break;
-			case 2: // enabled
-				$status = "E";
-				break;
-			case 3: // need update
-				$status = "P";
-				break;
-			default:
-				$status = "X";
-		}
-		
-		$displayName = $module["displayName"];
-		$rawname     = $module["rawname"];
-		printf( " $status - $rawname : $displayName\n" );
-	}
-}
-
-function disable_module( $module )
-{
-	switch ($module["status"])
-	{
-		case 0:
-			outn("Module not installed, ignoring");
-			break;
-		case 1:
-			outn("Module already disabled, ignoring");
-			break;
-		case 2:
-			outn("Disabling module " . $module['rawname'] );
-			disableModule( $module["rawname"] );
-	}
-
-}
-
-function uninstall_module( $module )
-{
-	disable_module( $module );
-	
-	if (runModuleSQL($module['rawname'],'uninstall'))
-	{
-		outn("Uninstalling module: " . $module['rawname'] );
-		uninstallModule($module['rawname']);
-	}
-	else
-		printf( "Module uninstall script failed to run\n" );
-}
-
-function enable_module( $module )
-{
-	switch ($module["status"])
-	{
-		case 0:
-			install_module( $module  );
-		case 1:
-			outn("Enabling module: " . $module['rawname'] );
-			enableModule( $module['rawname'] );
-			break;
-		case 2:
-			outn("Module already enabled, ignoring");
-			break;
-		case 3:
-			outn("Upgrading module...");
-
-			// the install.php can set this to false if the upgrade fails.
-			$success = true;
-			if(is_file("modules/$module_name/install.php"))
-				include "modules/$module_name/install.php";
-
-			if ($success)
-			{
-				$sql_str = 'UPDATE modules SET version = "' . $module['version'] . '" WHERE modulename = "'.$module['rawname'].'"';
-				debug( "Runing SQL " . $sql_str);
-				sql( $sql_str );
-			}
-			else
-				printf("*** Error in install.php command, module is not upgraded.\n");
-			break;
-	}
-}
-
-function install_module( $module )
-{
-	$module_version = $module['version'];
-	outn("Installing module: " . $module['rawname'] );
-	
-	if (runModuleSQL($module['rawname'],'install')) 
-		installModule( $module['rawname'], $module_version );
-	else
-		printf( "Module install script failed to run\n" );
-	
-}
-
-// -------------------------------------------------
-// main
-// -------------------------------------------------
-
-if (! @ include('DB.php')) {
-	echo ("FAILED: PEAR must be installed (requires DB.php). Include path: ".ini_get("include_path"));
-}
-
-if (! @ include("Console/Getopt.php")) {
-	echo ( "FAILED: PEAR must be installed (requires Console/Getopt.php). Include path: ".ini_get("include_path"));
-}
-// exit;
-
-require_once( FREEPBX_PATH . "functions.inc.php");
-$amp_conf = parse_amportal_conf( AMP_CONF );
-
-require_once( FREEPBX_PATH . "common/db_connect.php"); //PEAR must be installed
-
-
-$shortopts = "hdv";
-$longopts = array( "help","debug","verbose","status",  );
-
-$args = Console_Getopt::getopt(Console_Getopt::readPHPArgv(), $shortopts, $longopts);
-if (is_object($args)) {
-        // assume it's PEAR_ERROR
-        out($args->message);
-        exit(255);
-}
-
-foreach ($args[0] as $arg) {
-        switch ($arg[0]) {
-		case "--help": case "h": case "?":
-			showHelp();
-			exit(10);
-			break;
-		case "--dry-run":
-			out("Dry-run only, nothing will be changed");
-			$dryrun = true;
-			break;
-		case "--debug": case "d":
-			$debug = true;
-			debug("Debug mode enabled");
-			break;
-		case "--verbose": case "v":
-			$verbose = true;
-			debug("Verbose mode enabled");
-			break;
-        }
-}
-
-$local_modules  = find_allmodules();
-$module_name    = $args[1][1];
-$module         = $local_modules[$module_name];
-
-
-// freepbx modules will include the unsintall scripts
-// using relative paths. why not modifiying the include dir...?
-chdir ( $amp_conf["AMPWEBROOT"] . "/admin/" );
-
-switch ($args[1][0])
-{
-	case "st":
-	case "status":
-		outn("Getting modules information");
-		show_modules_status( $local_modules );
-		exit();
-		break;
-
-	case "disable":
-		if (!$module)
-			printf("Module $module_name not found, ignoring\n");
-		else
-			disable_module( $module );
-		break;
-		
-	case "remove":
-	case "uninstall":
-		if (!$module)
-			printf("Module $module_name not found, ignoring\n");
-		else
-			uninstall_module( $module );
-		break;
-
-	case "enable":
-		if (!$module)
-			printf("Module $module_name not found, ignoring\n");
-		else
-			enable_module( $module );
-		break;
-		
-	case "install":
-		if (!$module)
-			printf("Module $module_name not found, ignoring\n");
-		else
-			install_module( $module );
-		break;
-
-	default:
-		showHelp();
-		exit();
-}
-
-needreload();
-
-?>

Deleted: freepbx/trunk/debian/rapid/freepbx-remove-mysql.sh
===================================================================
--- freepbx/trunk/debian/rapid/freepbx-remove-mysql.sh	2007-03-08 10:33:22 UTC (rev 3209)
+++ freepbx/trunk/debian/rapid/freepbx-remove-mysql.sh	2007-03-08 15:28:37 UTC (rev 3210)
@@ -1,57 +0,0 @@
-#!/bin/sh
-
-#   Written by Tzafrir Cohen <tzafrir.cohen at xorcom.com>, 
-#              Diego Iastrubni <diego.iastrubni at xorcom.com>
-#   Copyright (C) 2005, Xorcom
-#  
-#   All rights reserved.
-#  
-#   This program is free software; you can redistribute it and/or modify
-#   it under the terms of the GNU General Public License as published by
-#   the Free Software Foundation; either version 2 of the License, or
-#   (at your option) any later version.
-#  
-#   This program is distributed in the hope that it will be useful,
-#   but WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#   GNU General Public License for more details.
-#  
-#   You should have received a copy of the GNU General Public License
-#   along with this program; if not, write to the Free Software
-#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# a small script to generate the needed SQL tables by AMPortal
-# needs to be run as root
-
-# quoted from the daily cron of mysql:
-MYSQL="mysql --defaults-extra-file=/etc/mysql/debian.cnf -f"
-MYSQLADMIN="mysqladmin --defaults-extra-file=/etc/mysql/debian.cnf -f"
-
-
-exec_command()
-{
-	CMD=$1
-	
-	if [ "$DEBUG" == "1" ] ; then
-        	echo "$CMD"
-	fi
-	$CMD
-}
-
-delete_db()
-{
-	DB=$1
-
-	if [ -d /var/lib/mysql/$DB ]; then
-		echo "Dropping $DB ... "
-		exec_command "$MYSQLADMIN DROP $DB";
-	fi
-}
-
-
-delete_db "asterisk"    
-delete_db "asteriskcdrdb" 
-
-echo
-echo "The freepbx databases have been purged"
-echo

Deleted: freepbx/trunk/debian/rapid/freepbx-remove-sqlite.sh
===================================================================
--- freepbx/trunk/debian/rapid/freepbx-remove-sqlite.sh	2007-03-08 10:33:22 UTC (rev 3209)
+++ freepbx/trunk/debian/rapid/freepbx-remove-sqlite.sh	2007-03-08 15:28:37 UTC (rev 3210)
@@ -1,56 +0,0 @@
-#!/bin/sh
-
-#   Written by Tzafrir Cohen <tzafrir.cohen at xorcom.com>, 
-#              Diego Iastrubni <diego.iastrubni at xorcom.com>
-#   Copyright (C) 2005, Xorcom
-#  
-#   All rights reserved.
-#  
-#   This program is free software; you can redistribute it and/or modify
-#   it under the terms of the GNU General Public License as published by
-#   the Free Software Foundation; either version 2 of the License, or
-#   (at your option) any later version.
-#  
-#   This program is distributed in the hope that it will be useful,
-#   but WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#   GNU General Public License for more details.
-#  
-#   You should have received a copy of the GNU General Public License
-#   along with this program; if not, write to the Free Software
-#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# a small script for purging SQLite tables for freepbx
-
-DEF_ADMIN_USER="admin"
-DEF_ADMIN_PASSWD="admin"
-
-if [ ! -f /etc/amportal.conf ]; then
-        echo "amportal configuration not found, please install amportal.conf"
-        echo "  cp /usr/share/freepbx-common/amportal.conf /etc/amportal.conf"
-        echo "Modify it to your needs and run this script again."
-        exit 1
-fi
-
-. /etc/amportal.conf
-
-if [ "$AMPDBENGINE" != "sqlite" ]; then
-        echo "FreePBX is not configured to work with SQLite"
-	echo "Ignoring..."
-	exit
-fi
-
-if [ "x$AMPDBFILE" == "x" ]; then
-        echo "No database file is configured in /etc/amportal.conf"
-	echo "Ignoring..."
-        exit
-fi
-
-
-echo -n "Deleting SQLite database $AMPDBFILE"
-rm -f $AMPDBFILE
-echo "."
-
-echo
-echo "The freepbx databases have been purged"
-echo

Deleted: freepbx/trunk/debian/rapid/newinstall.sqlite3.sql
===================================================================
--- freepbx/trunk/debian/rapid/newinstall.sqlite3.sql	2007-03-08 10:33:22 UTC (rev 3209)
+++ freepbx/trunk/debian/rapid/newinstall.sqlite3.sql	2007-03-08 15:28:37 UTC (rev 3210)
@@ -1,450 +0,0 @@
--- MySQL dump 10.9
---
--- Host: localhost    Database: asterisk
--- ------------------------------------------------------
--- Server version	4.1.20
-
-/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
-/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
-/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
-/*!40101 SET NAMES utf8 */;
-/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
-/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-
---
--- Table structure for table `Backup`
---
-
-DROP TABLE IF EXISTS `Backup`;
-CREATE TABLE `Backup` (
-  `Name` varchar(50) default NULL,
-  `Voicemail` varchar(50) default NULL,
-  `Recordings` varchar(50) default NULL,
-  `Configurations` varchar(50) default NULL,
-  `CDR` varchar(55) default NULL,
-  `FOP` varchar(50) default NULL,
-  `Minutes` varchar(50) default NULL,
-  `Hours` varchar(50) default NULL,
-  `Days` varchar(50) default NULL,
-  `Months` varchar(50) default NULL,
-  `Weekdays` varchar(50) default NULL,
-  `Command` varchar(200) default NULL,
-  `Method` varchar(50) default NULL,
-  `ID` integer NOT NULL PRIMARY KEY AUTOINCREMENT
-) ;
-
---
--- Dumping data for table `Backup`
---
-
-
-/*!40000 ALTER TABLE `Backup` DISABLE KEYS */;
--- /* TABLES `Backup` WRITE;
---  TABLES;*/
-/*!40000 ALTER TABLE `Backup` ENABLE KEYS */;
-
---
--- Table structure for table `admin`
---
-
-DROP TABLE IF EXISTS `admin`;
-CREATE TABLE `admin` (
-  `variable` varchar(20) NOT NULL default '',
-  `value` varchar(80) NOT NULL default '',
-  PRIMARY KEY  (`variable`)
-) ;
-
---
--- Dumping data for table `admin`
---
-
-
-/*!40000 ALTER TABLE `admin` DISABLE KEYS */;
---  TABLES `admin` WRITE;
-INSERT INTO `admin` VALUES ('need_reload','true');
-INSERT INTO `admin` VALUES ('version','2.2.0beta3');
---  TABLES;
-/*!40000 ALTER TABLE `admin` ENABLE KEYS */;
-
---
--- Table structure for table `ampusers`
---
-
-DROP TABLE IF EXISTS `ampusers`;
-CREATE TABLE `ampusers` (
-  `username` varchar(20) NOT NULL default '',
-  `password` varchar(20) NOT NULL default '',
-  `extension_low` varchar(20) NOT NULL default '',
-  `extension_high` varchar(20) NOT NULL default '',
-  `deptname` varchar(20) NOT NULL default '',
-  `sections` varchar(255) NOT NULL default '',
-  PRIMARY KEY  (`username`)
-) ;
-
---
--- Dumping data for table `ampusers`
---
-
-
-/*!40000 ALTER TABLE `ampusers` DISABLE KEYS */;
---  TABLES `ampusers` WRITE;
-INSERT INTO `ampusers` VALUES ('admin','admin','','','','*');
---  TABLES;
-/*!40000 ALTER TABLE `ampusers` ENABLE KEYS */;
-
---
--- Table structure for table `devices`
---
-
-DROP TABLE IF EXISTS `devices`;
-CREATE TABLE `devices` (
-  `id` varchar(20) NOT NULL default '',
-  `tech` varchar(10) NOT NULL default '',
-  `dial` varchar(50) NOT NULL default '',
-  `devicetype` varchar(5) NOT NULL default '',
-  `user` varchar(50) default NULL,
-  `description` varchar(50) default NULL,
-  `emergency_cid` varchar(100) default NULL
-) ;
-
---
--- Dumping data for table `devices`
---
-
-
-/*!40000 ALTER TABLE `devices` DISABLE KEYS */;
---  TABLES `devices` WRITE;
---  TABLES;
-/*!40000 ALTER TABLE `devices` ENABLE KEYS */;
-
---
--- Table structure for table `extensions`
---
-
-DROP TABLE IF EXISTS `extensions`;
-CREATE TABLE `extensions` (
-  `context` varchar(45) NOT NULL default 'default',
-  `extension` varchar(45) NOT NULL default '',
-  `priority` varchar(5) NOT NULL default '1',
-  `application` varchar(45) NOT NULL default '',
-  `args` varchar(255) default NULL,
-  `descr` text,
-  `flags` int(1) NOT NULL default '0',
-  PRIMARY KEY  (`context`,`extension`,`priority`)
-) ;
-
---
--- Dumping data for table `extensions`
---
-
-
-/*!40000 ALTER TABLE `extensions` DISABLE KEYS */;
---  TABLES `extensions` WRITE;
-INSERT INTO `extensions` VALUES ('outrt-001-9_outside','_9.','1','Macro','dialout-trunk,1,${EXTEN:1}',NULL,0);
-INSERT INTO `extensions` VALUES ('outrt-001-9_outside','_9.','2','Macro','outisbusy','No available circuits',0);
-INSERT INTO `extensions` VALUES ('outbound-allroutes','include','1','outrt-001-9_outside','','',2);
---  TABLES;
-/*!40000 ALTER TABLE `extensions` ENABLE KEYS */;
-
---
--- Table structure for table `featurecodes`
---
-
-DROP TABLE IF EXISTS `featurecodes`;
-CREATE TABLE `featurecodes` (
-  `modulename` varchar(50) NOT NULL default '',
-  `featurename` varchar(50) NOT NULL default '',
-  `description` varchar(200) NOT NULL default '',
-  `defaultcode` varchar(20) default NULL,
-  `customcode` varchar(20) default NULL,
-  `enabled` tinyint(4) NOT NULL default '0',
-  PRIMARY KEY  (`modulename`,`featurename`)
---   KEY `enabled` (`enabled`)
-) ;
-
---
--- Dumping data for table `featurecodes`
---
-
-
-/*!40000 ALTER TABLE `featurecodes` DISABLE KEYS */;
---  TABLES `featurecodes` WRITE;
-INSERT INTO `featurecodes` VALUES ('core','userlogon','User Logon','*11',NULL,1);
-INSERT INTO `featurecodes` VALUES ('core','userlogoff','User Logoff','*12',NULL,1);
-INSERT INTO `featurecodes` VALUES ('core','zapbarge','ZapBarge','888',NULL,1);
-INSERT INTO `featurecodes` VALUES ('core','simu_pstn','Simulate Incoming Call','7777',NULL,1);
-INSERT INTO `featurecodes` VALUES ('core','simu_fax','Simulate Incoming FAX Call','666',NULL,1);
-INSERT INTO `featurecodes` VALUES ('core','chanspy','ChanSpy','555',NULL,1);
-INSERT INTO `featurecodes` VALUES ('core','pickup','Call Pickup (Can be used with GXP-2000)','**',NULL,1);
---  TABLES;
-/*!40000 ALTER TABLE `featurecodes` ENABLE KEYS */;
-
---
--- Table structure for table `freepbx_log`
---
-
-DROP TABLE IF EXISTS `freepbx_log`;
-CREATE TABLE `freepbx_log` (
-  `id` integer NOT NULL PRIMARY KEY AUTOINCREMENT,
-  `time` datetime NOT NULL default '0000-00-00 00:00:00',
-  `section` varchar(50) default NULL,
---   `level` enum('error','warning','debug','devel-debug') NOT NULL default 'error',
---  `level` enum('error','warning','debug','devel-debug') NOT NULL,
- `level` varchar(10),
-  `status` int(11) NOT NULL default '0',
-  `message` text NOT NULL
--- ,
---   PRIMARY KEY  (`id`),
---   KEY `time` (`time`,`level`)
-) ;
-
---
--- Dumping data for table `freepbx_log`
---
-
-
-/*!40000 ALTER TABLE `freepbx_log` DISABLE KEYS */;
---  TABLES `freepbx_log` WRITE;
-INSERT INTO `freepbx_log` VALUES (1,'2006-11-06 01:55:36','retrieve_conf','devel-debug',0,'Started retrieve_conf, DB Connection OK');
-INSERT INTO `freepbx_log` VALUES (2,'2006-11-06 01:55:36','retrieve_conf','devel-debug',0,'Writing extensions_additional.conf');
---  TABLES;
-/*!40000 ALTER TABLE `freepbx_log` ENABLE KEYS */;
-
---
--- Table structure for table `globals`
---
-
-DROP TABLE IF EXISTS `globals`;
-CREATE TABLE `globals` (
-  `variable` char(20) NOT NULL default '',
-  `value` char(50) NOT NULL default '',
-  PRIMARY KEY  (`variable`)
-) ;
-
---
--- Dumping data for table `globals`
---
-
-
-/*!40000 ALTER TABLE `globals` DISABLE KEYS */;
---  /*TABLES*/ `globals` WRITE;
-INSERT INTO `globals` VALUES ('CALLFILENAME','\"\"');
-INSERT INTO `globals` VALUES ('DIAL_OPTIONS','tr');
-INSERT INTO `globals` VALUES ('TRUNK_OPTIONS','');
-INSERT INTO `globals` VALUES ('DIAL_OUT','9');
-INSERT INTO `globals` VALUES ('FAX','');
-INSERT INTO `globals` VALUES ('FAX_RX','system');
-INSERT INTO `globals` VALUES ('FAX_RX_EMAIL','fax at mydomain.com');
-INSERT INTO `globals` VALUES ('FAX_RX_FROM','freepbx at gmail.com');
-INSERT INTO `globals` VALUES ('INCOMING','group-all');
-INSERT INTO `globals` VALUES ('NULL','\"\"');
-INSERT INTO `globals` VALUES ('OPERATOR','');
-INSERT INTO `globals` VALUES ('OPERATOR_XTN','');
-INSERT INTO `globals` VALUES ('PARKNOTIFY','SIP/200');
-INSERT INTO `globals` VALUES ('RECORDEXTEN','\"\"');
-INSERT INTO `globals` VALUES ('RINGTIMER','15');
-INSERT INTO `globals` VALUES ('DIRECTORY','last');
-INSERT INTO `globals` VALUES ('AFTER_INCOMING','');
-INSERT INTO `globals` VALUES ('IN_OVERRIDE','forcereghours');
-INSERT INTO `globals` VALUES ('REGTIME','7:55-17:05');
-INSERT INTO `globals` VALUES ('REGDAYS','mon-fri');
-INSERT INTO `globals` VALUES ('DIRECTORY_OPTS','');
-INSERT INTO `globals` VALUES ('DIALOUTIDS','1');
-INSERT INTO `globals` VALUES ('OUT_1','ZAP/g0');
-INSERT INTO `globals` VALUES ('VM_PREFIX','*');
-INSERT INTO `globals` VALUES ('VM_OPTS','');
-INSERT INTO `globals` VALUES ('VM_GAIN','');
-INSERT INTO `globals` VALUES ('VM_DDTYPE','u');
-INSERT INTO `globals` VALUES ('TIMEFORMAT','kM');
-INSERT INTO `globals` VALUES ('TONEZONE','us');
-INSERT INTO `globals` VALUES ('ALLOW_SIP_ANON','no');
---  TABLES;
-/*!40000 ALTER TABLE `globals` ENABLE KEYS */;
-
---
--- Table structure for table `iax`
---
-
-DROP TABLE IF EXISTS `iax`;
-CREATE TABLE `iax` (
-  `id` varchar(20) NOT NULL default '-1',
-  `keyword` varchar(30) NOT NULL default '',
-  `data` varchar(150) NOT NULL default '',
-  `flags` int(1) NOT NULL default '0',
-  PRIMARY KEY  (`id`,`keyword`)
-) ;
-
---
--- Dumping data for table `iax`
---
-
-
-/*!40000 ALTER TABLE `iax` DISABLE KEYS */;
---  TABLES `iax` WRITE;
---  TABLES;
-/*!40000 ALTER TABLE `iax` ENABLE KEYS */;
-
---
--- Table structure for table `incoming`
---
-
-DROP TABLE IF EXISTS `incoming`;
-CREATE TABLE `incoming` (
-  `cidnum` varchar(20) default NULL,
-  `extension` varchar(20) default NULL,
-  `destination` varchar(50) default NULL,
-  `faxexten` varchar(20) default NULL,
-  `faxemail` varchar(50) default NULL,
-  `answer` tinyint(1) default NULL,
-  `wait` int(2) default NULL,
-  `privacyman` tinyint(1) default NULL,
-  `alertinfo` varchar(32) default NULL,
-  `channel` varchar(20) default NULL,
-  `ringing` varchar(20) default NULL
-) ;
-
---
--- Dumping data for table `incoming`
---
-
-
-/*!40000 ALTER TABLE `incoming` DISABLE KEYS */;
---  TABLES `incoming` WRITE;
---  TABLES;
-/*!40000 ALTER TABLE `incoming` ENABLE KEYS */;
-
---
--- Table structure for table `modules`
---
-
-DROP TABLE IF EXISTS `modules`;
-CREATE TABLE `modules` (
-  `id` INTEGER NOT NULL  PRIMARY KEY AUTOINCREMENT,
-  `modulename` varchar(50) NOT NULL default '',
-  `version` varchar(20) NOT NULL default '',
-  `enabled` tinyint(4) NOT NULL default '0'
-) ;
-
---
--- Dumping data for table `modules`
---
-
-
-/*!40000 ALTER TABLE `modules` DISABLE KEYS */;
---  TABLES `modules` WRITE;
-INSERT INTO `modules` VALUES (1,'core','1.2',1);
---  TABLES;
-/*!40000 ALTER TABLE `modules` ENABLE KEYS */;
-
---
--- Table structure for table `queues`
---
-
-DROP TABLE IF EXISTS `queues`;
-CREATE TABLE `queues` (
-  `id` bigint(11) NOT NULL default '-1',
-  `keyword` varchar(20) NOT NULL default '',
-  `data` varchar(150) NOT NULL default '',
-  `flags` int(1) NOT NULL default '0',
-  PRIMARY KEY  (`id`,`keyword`,`data`)
-) ;
-
---
--- Dumping data for table `queues`
---
-
-
-/*!40000 ALTER TABLE `queues` DISABLE KEYS */;
---  TABLES `queues` WRITE;
---  TABLES;
-/*!40000 ALTER TABLE `queues` ENABLE KEYS */;
-
---
--- Table structure for table `sip`
---
-
-DROP TABLE IF EXISTS `sip`;
-CREATE TABLE `sip` (
-  `id` varchar(20) NOT NULL default '-1',
-  `keyword` varchar(30) NOT NULL default '',
-  `data` varchar(150) NOT NULL default '',
-  `flags` int(1) NOT NULL default '0',
-  PRIMARY KEY  (`id`,`keyword`)
-) ;
-
---
--- Dumping data for table `sip`
---
-
-
-/*!40000 ALTER TABLE `sip` DISABLE KEYS */;
---  TABLES `sip` WRITE;
---  TABLES;
-/*!40000 ALTER TABLE `sip` ENABLE KEYS */;
-
---
--- Table structure for table `users`
---
-
-DROP TABLE IF EXISTS `users`;
-CREATE TABLE `users` (
-  `extension` varchar(20) NOT NULL default '',
-  `password` varchar(20) default NULL,
-  `name` varchar(50) default NULL,
-  `voicemail` varchar(50) default NULL,
-  `ringtimer` int(3) default NULL,
-  `noanswer` varchar(100) default NULL,
-  `recording` varchar(50) default NULL,
-  `outboundcid` varchar(50) default NULL,
-  `directdid` varchar(50) default NULL,
-  `didalert` varchar(50) default NULL,
-  `faxexten` varchar(20) default NULL,
-  `faxemail` varchar(50) default NULL,
-  `answer` tinyint(1) default NULL,
-  `wait` int(2) default NULL,
-  `privacyman` tinyint(1) default NULL
-) ;
-
---
--- Dumping data for table `users`
---
-
-
-/*!40000 ALTER TABLE `users` DISABLE KEYS */;
---  TABLES `users` WRITE;
---  TABLES;
-/*!40000 ALTER TABLE `users` ENABLE KEYS */;
-
---
--- Table structure for table `zap`
---
-
-DROP TABLE IF EXISTS `zap`;
-CREATE TABLE `zap` (
-  `id` varchar(20) NOT NULL default '-1',
-  `keyword` varchar(30) NOT NULL default '',
-  `data` varchar(150) NOT NULL default '',
-  `flags` int(1) NOT NULL default '0',
-  PRIMARY KEY  (`id`,`keyword`)
-) ;
-
---
--- Dumping data for table `zap`
---
-
-
-/*!40000 ALTER TABLE `zap` DISABLE KEYS */;
---  TABLES `zap` WRITE;
---  TABLES;
-/*!40000 ALTER TABLE `zap` ENABLE KEYS */;
-
-/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
-/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
-/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
-/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
-/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
-/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-

Copied: freepbx/trunk/debian/rapid/update-freepbx (from rev 3208, freepbx/trunk/debian/rapid/apply_conf.sh)


Property changes on: freepbx/trunk/debian/rapid/update-freepbx
___________________________________________________________________
Name: svn:executable
   + *

Modified: freepbx/trunk/debian/rules
===================================================================
--- freepbx/trunk/debian/rules	2007-03-08 10:33:22 UTC (rev 3209)
+++ freepbx/trunk/debian/rules	2007-03-08 15:28:37 UTC (rev 3210)
@@ -78,43 +78,52 @@
 	dh_installdirs -i
 	dh_install -i
 	
-	dh_link -p freepbx-admin usr/share/freepbx/		usr/share/freepbx/admin
+	dh_link -p freepbx-common usr/share/freepbx/		usr/share/freepbx/admin
 	dh_link -p freepbx-panel usr/share/op-panel/flash	usr/share/freepbx/panel
-	dh_link -p freepbx-admin usr/share/freepbx/		var/www/amportal
-	dh_link -p freepbx-admin usr/share/freepbx/		var/www/freepbx
+	dh_link -p freepbx-common usr/share/freepbx/		var/www/amportal
+	dh_link -p freepbx-common usr/share/freepbx/		var/www/freepbx
+
+#	may be removed in the future
+	dh_link -p freepbx-common usr/share/freepbx/		var/www/amportal
+
 	
-#	to be obsoleted soon
-	dh_link -p freepbx-admin usr/share/freepbx/		var/www/amportal
-
 #	this file is only part of freepbx-admin, no need to install it on the default package
 	rm -f debian/asterisk-config-freepbx/etc/asterisk/manager.d/freepbx.conf
 
 #	these 2 are in separate packages
-	rm -f debian/freepbx-admin/usr/share/freepbx/reports.php
-	rm -f debian/freepbx-admin/usr/share/freepbx/panel.php
+	rm -f debian/freepbx-common/usr/share/freepbx/reports.php
+	rm -f debian/freepbx-common/usr/share/freepbx/panel.php
 
 #	lets clean up the updates dir... deb keeps track of those things
-	rm -f debian/freepbx-admin/usr/share/freepbx/admin/i18n/*.txt
-	rm -f debian/freepbx-admin/usr/share/freepbx-common/upgrades/*.md5
-	rm -f debian/freepbx-admin/usr/share/freepbx-common/upgrades/md5-amp_conf.sh
+	rm -f debian/freepbx-common/usr/share/freepbx/admin/i18n/*.txt
+	rm -f debian/freepbx-common/usr/share/freepbx-common/upgrades/*.md5
+	rm -f debian/freepbx-common/usr/share/freepbx-common/upgrades/md5-amp_conf.sh
 	
-#	lintaian shouts
-#	chmod -x debian/freepbx-admin/usr/share/freepbx-common/upgrades/2.1beta1/tables.php
-#	chmod -x debian/freepbx-admin/usr/share/freepbx-common/upgrades/2.1beta3/tables.php
-	
-	chmod +x debian/freepbx-admin/usr/share/freepbx-common/apply_conf.sh
-	chmod +x debian/freepbx-admin/usr/share/freepbx-common/freepbx-install-mysql.sh
-	chmod +x debian/freepbx-admin/usr/share/freepbx-common/freepbx-install-sqlite.sh
-	chmod +x debian/freepbx-admin/usr/share/freepbx-common/freepbx-post-reload
-	chmod +x debian/freepbx-admin/usr/share/freepbx-common/freepbx-remove-mysql.sh
-	chmod +x debian/freepbx-admin/usr/share/freepbx-common/freepbx-remove-sqlite.sh
-	chmod +x debian/freepbx-admin/usr/share/freepbx-common/freepbx-enable-all-modules
-	
+
+	chmod +x debian/freepbx-common/usr/share/freepbx-common/freepbx-post-reload
+	chmod +x debian/freepbx-common/usr/share/freepbx-common/freepbx-enable-all-modules
+#	chmod +x debian/freepbx-common/usr/sbin/update-freepbx
+
+#	chmod +x debian/freepbx-common/usr/share/freepbx-common/freepbx-install-mysql.sh
+#	chmod +x debian/freepbx-common/usr/share/freepbx-common/freepbx-install-sqlite.sh
+#	chmod +x debian/freepbx-common/usr/share/freepbx-common/freepbx-remove-mysql.sh
+#	chmod +x debian/freepbx-common/usr/share/freepbx-common/freepbx-remove-sqlite.sh
+
+	mv debian/freepbx-mysql/usr/share/freepbx-common/freepbx-remove-mysql.sh  debian/freepbx-mysql/usr/share/freepbx-common/remove-sql
+	mv debian/freepbx-mysql/usr/share/freepbx-common/freepbx-install-mysql.sh debian/freepbx-mysql/usr/share/freepbx-common/install-sql
+	chmod +x debian/freepbx-mysql/usr/share/freepbx-common/remove-sql
+	chmod +x debian/freepbx-mysql/usr/share/freepbx-common/install-sql
+
+	mv debian/freepbx-sqlite3/usr/share/freepbx-common/freepbx-remove-sqlite.sh  debian/freepbx-sqlite3/usr/share/freepbx-common/remove-sql
+	mv debian/freepbx-sqlite3/usr/share/freepbx-common/freepbx-install-sqlite.sh debian/freepbx-sqlite3/usr/share/freepbx-common/install-sql
+	chmod +x debian/freepbx-sqlite3/usr/share/freepbx-common/remove-sql
+	chmod +x debian/freepbx-sqlite3/usr/share/freepbx-common/install-sql
+
 # 	lintian does not handle this php4-cgi | php5-cgi now
-	mkdir -p debian/freepbx-admin/usr/share/lintian/overrides/
-	cp debian/lintian debian/freepbx-admin/usr/share/lintian/overrides/freepbx-admin
-	mkdir -p debian/freepbx-agi/usr/share/lintian/overrides/
-	cp debian/lintian debian/freepbx-agi/usr/share/lintian/overrides/freepbx-agi
+#	mkdir -p debian/freepbx-common/usr/share/lintian/overrides/
+#	cp debian/lintian debian/freepbx-common/usr/share/lintian/overrides/freepbx-admin
+#	mkdir -p debian/freepbx-agi/usr/share/lintian/overrides/
+#	cp debian/lintian debian/freepbx-agi/usr/share/lintian/overrides/freepbx-agi
 
 # Must not depend on anything. This is to be called by
 # binary-arch/binary-indep

Copied: freepbx/trunk/debian/sqlite3/freepbx-install-sqlite.sh (from rev 3208, freepbx/trunk/debian/rapid/freepbx-install-sqlite.sh)

Copied: freepbx/trunk/debian/sqlite3/freepbx-remove-sqlite.sh (from rev 3208, freepbx/trunk/debian/rapid/freepbx-remove-sqlite.sh)

Copied: freepbx/trunk/debian/sqlite3/newinstall.sqlite3.sql (from rev 3208, freepbx/trunk/debian/rapid/newinstall.sqlite3.sql)




More information about the Pkg-voip-commits mailing list