[Pkg-voip-commits] r6389 - in /freepbx/branches/dbconfig-common/debian: freepbx-common.config freepbx-common.install freepbx-common.postinst freepbx-common.postrm freepbx-common.prerm rules share/amportal.conf
odd_bloke-guest at alioth.debian.org
odd_bloke-guest at alioth.debian.org
Wed Nov 5 15:56:41 UTC 2008
Author: odd_bloke-guest
Date: Wed Nov 5 15:56:41 2008
New Revision: 6389
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=6389
Log:
Started adding dbconfig-common stuff.
Added:
freepbx/branches/dbconfig-common/debian/freepbx-common.config
freepbx/branches/dbconfig-common/debian/freepbx-common.prerm
Modified:
freepbx/branches/dbconfig-common/debian/freepbx-common.install
freepbx/branches/dbconfig-common/debian/freepbx-common.postinst
freepbx/branches/dbconfig-common/debian/freepbx-common.postrm
freepbx/branches/dbconfig-common/debian/rules
freepbx/branches/dbconfig-common/debian/share/amportal.conf
Added: freepbx/branches/dbconfig-common/debian/freepbx-common.config
URL: http://svn.debian.org/wsvn/pkg-voip/freepbx/branches/dbconfig-common/debian/freepbx-common.config?rev=6389&op=file
==============================================================================
--- freepbx/branches/dbconfig-common/debian/freepbx-common.config (added)
+++ freepbx/branches/dbconfig-common/debian/freepbx-common.config Wed Nov 5 15:56:41 2008
@@ -1,0 +1,9 @@
+#!/bin/sh
+
+# source debconf stuff
+. /usr/share/debconf/confmodule
+# source dbconfig-common shell library, and call the hook function
+if [ -f /usr/share/dbconfig-common/dpkg/config.mysql ]; then
+ . /usr/share/dbconfig-common/dpkg/config.mysql
+ dbc_go freepbx-common $@
+fi
Modified: freepbx/branches/dbconfig-common/debian/freepbx-common.install
URL: http://svn.debian.org/wsvn/pkg-voip/freepbx/branches/dbconfig-common/debian/freepbx-common.install?rev=6389&op=diff
==============================================================================
--- freepbx/branches/dbconfig-common/debian/freepbx-common.install (original)
+++ freepbx/branches/dbconfig-common/debian/freepbx-common.install Wed Nov 5 15:56:41 2008
@@ -23,7 +23,7 @@
debian/share/update-freepbx usr/sbin/
debian/share/post-reload/* usr/share/freepbx-common/post-reload/
-SQL/*.sql usr/share/freepbx-common/sql/
+SQL/newinstall.sql usr/share/dbconfig-common/data/freepbx-common/install/mysql
upgrades/* usr/share/freepbx-common/upgrades/
debian/apache2 etc/
Modified: freepbx/branches/dbconfig-common/debian/freepbx-common.postinst
URL: http://svn.debian.org/wsvn/pkg-voip/freepbx/branches/dbconfig-common/debian/freepbx-common.postinst?rev=6389&op=diff
==============================================================================
--- freepbx/branches/dbconfig-common/debian/freepbx-common.postinst (original)
+++ freepbx/branches/dbconfig-common/debian/freepbx-common.postinst Wed Nov 5 15:56:41 2008
@@ -32,12 +32,7 @@
issue_install()
{
- # copy the default configuration file
- cp /usr/share/freepbx-common/amportal.conf /etc/amportal.conf
-
- # create random passwords for manager and sql
- RAND_PASS=`dd if=/dev/urandom count=20 2>/dev/null | md5sum | awk '{print $1}'` &&
- sed -r -i "s/AMPDBPASS=[a-zA-Z0-9]*/AMPDBPASS=$RAND_PASS/" /etc/amportal.conf
+ # create random passwords for manager
RAND_PASS=`dd if=/dev/urandom count=20 2>/dev/null | md5sum | awk '{print $1}'` &&
sed -r -i "s/AMPMGRPASS=[a-zA-Z0-9]*/AMPMGRPASS=$RAND_PASS/" /etc/amportal.conf
@@ -81,6 +76,12 @@
fi
}
+
+. /usr/share/debconf/confmodule
+if [ -f /usr/share/dbconfig-common/dpkg/config.mysql ]; then
+ . /usr/share/dbconfig-common/dpkg/config.mysql
+ dbc_go freepbx-common $@
+fi
case "$1" in
configure)
Modified: freepbx/branches/dbconfig-common/debian/freepbx-common.postrm
URL: http://svn.debian.org/wsvn/pkg-voip/freepbx/branches/dbconfig-common/debian/freepbx-common.postrm?rev=6389&op=diff
==============================================================================
--- freepbx/branches/dbconfig-common/debian/freepbx-common.postrm (original)
+++ freepbx/branches/dbconfig-common/debian/freepbx-common.postrm Wed Nov 5 15:56:41 2008
@@ -20,11 +20,14 @@
# set -x
# fi
+. /usr/share/debconf/confmodule
+if [ -f /usr/share/dbconfig-common/dpkg/config.mysql ]; then
+ . /usr/share/dbconfig-common/dpkg/config.mysql
+ dbc_go freepbx-common $@
+fi
+
case "$1" in
purge)
- # this may fall, no problems
- /usr/share/freepbx-common/remove-sql || true
-
rm -f /etc/amportal.conf || true
;;
Added: freepbx/branches/dbconfig-common/debian/freepbx-common.prerm
URL: http://svn.debian.org/wsvn/pkg-voip/freepbx/branches/dbconfig-common/debian/freepbx-common.prerm?rev=6389&op=file
==============================================================================
--- freepbx/branches/dbconfig-common/debian/freepbx-common.prerm (added)
+++ freepbx/branches/dbconfig-common/debian/freepbx-common.prerm Wed Nov 5 15:56:41 2008
@@ -1,0 +1,10 @@
+#!/bin/sh
+# config maintainer script for freepbx-mysql
+
+# source debconf stuff
+. /usr/share/debconf/confmodule
+# source dbconfig-common shell library, and call the hook function
+if [ -f /usr/share/dbconfig-common/dpkg/config.mysql ]; then
+ . /usr/share/dbconfig-common/dpkg/config.mysql
+ dbc_go freepbx-common $@
+fi
Modified: freepbx/branches/dbconfig-common/debian/rules
URL: http://svn.debian.org/wsvn/pkg-voip/freepbx/branches/dbconfig-common/debian/rules?rev=6389&op=diff
==============================================================================
--- freepbx/branches/dbconfig-common/debian/rules (original)
+++ freepbx/branches/dbconfig-common/debian/rules Wed Nov 5 15:56:41 2008
@@ -116,6 +116,7 @@
dh_testdir
dh_testroot
dh_installchangelogs CHANGES
+ dh_installdebconf
dh_installman
dh_installdocs
dh_installexamples
Modified: freepbx/branches/dbconfig-common/debian/share/amportal.conf
URL: http://svn.debian.org/wsvn/pkg-voip/freepbx/branches/dbconfig-common/debian/share/amportal.conf?rev=6389&op=diff
==============================================================================
--- freepbx/branches/dbconfig-common/debian/share/amportal.conf (original)
+++ freepbx/branches/dbconfig-common/debian/share/amportal.conf Wed Nov 5 15:56:41 2008
@@ -33,13 +33,13 @@
#################################################################
# AMPDBHOST: the host to connect to the 'asterisk' mysql database
-AMPDBHOST=localhost
+AMPDBHOST=_DBC_DBSERVER_
# AMPDBUSER: the user to connect to the 'asterisk' mysql database
-AMPDBUSER=asteriskuser
+AMPDBUSER=_DBC_DBUSER_
# AMPDBPASS: the password for AMPDBUSER
-AMPDBPASS=amp109
+AMPDBPASS=_DBC_DBPASS_
# NOTES
# in case you lock yourself out of freepbx, you can use the
More information about the Pkg-voip-commits
mailing list