/[smecontribs]/rpms/smeserver-freepbx/contribs7/smeserver-freepbx-0.1-create_mysql.patch
ViewVC logotype

Annotation of /rpms/smeserver-freepbx/contribs7/smeserver-freepbx-0.1-create_mysql.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Thu Sep 30 09:52:16 2010 UTC (14 years, 1 month ago) by vip-ire
Branch: MAIN
CVS Tags: smeserver-freepbx-0_1-31_el4_sme, smeserver-freepbx-0_1-32_el4_sme, smeserver-freepbx-0_1-28_el4_sme, smeserver-freepbx-0_1-29_el4_sme, smeserver-freepbx-0_1-30_el4_sme, HEAD
Add missing patches

1 vip-ire 1.1 diff -Nur -x '*.orig' -x '*.rej' smeserver-freepbx-0.1/createlinks mezzanine_patched_smeserver-freepbx-0.1/createlinks
2     --- smeserver-freepbx-0.1/createlinks 2010-09-21 13:27:41.000000000 +0200
3     +++ mezzanine_patched_smeserver-freepbx-0.1/createlinks 2010-09-21 13:24:42.000000000 +0200
4     @@ -36,7 +36,7 @@
5     templates2events("/etc/asterisk/manager.conf", qw(freepbx-update bootstrap-console-save));
6     templates2events("/etc/httpd/conf/httpd.conf", $event);
7     templates2events("/etc/httpd/fpbx-conf/httpd.conf", qw(freepbx-update bootstrap-console-save conf-userpanel));
8     -templates2events("/etc/e-smith/sql/init/freepbx.sql", qw(freepbx-update bootstrap-console-save));
9     +templates2events("/etc/e-smith/sql/init/30freepbx_mysql_create_database", qw(freepbx-update bootstrap-console-save));
10    
11     event_link("freepbx-clean-crontab", $event, "40");
12     event_link("freepbx-dump-astdb", "pre-backup", "30");
13     diff -Nur -x '*.orig' -x '*.rej' smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/e-smith/sql/init/30freepbx_mysql_create_database mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/e-smith/sql/init/30freepbx_mysql_create_database
14     --- smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/e-smith/sql/init/30freepbx_mysql_create_database 1970-01-01 01:00:00.000000000 +0100
15     +++ mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/e-smith/sql/init/30freepbx_mysql_create_database 2010-09-21 13:26:25.000000000 +0200
16     @@ -0,0 +1,83 @@
17     +{
18     +
19     +my $dbname = $freepbx{'DbName'} || 'freepbxdb';
20     +my $cdrdbname = $freepbx{'CdrDbName'} || 'asteriskcdrdb';
21     +my $dbuser = $freepbx{'DbUser'} || 'freepbxuser';
22     +my $dbpass = $freepbx{'DbPassword'} || 'secret';
23     +my $cdrdbpass = $freepbx{'CdrDbPassword'} || 'secret';
24     +
25     +$OUT .= << "HERE";
26     +#! /bin/sh
27     +
28     +if [ ! -d /var/lib/mysql/$dbname ]; then
29     + mysqladmin create $dbname
30     +
31     + if [ -e /usr/lib/freepbx/SQL/newinstall.sql ]; then
32     + mysql $dbname < /usr/lib/freepbx/SQL/newinstall.sql
33     + else
34     + echo "Error: file /usr/lib/freepbx/SQL/newinstall.sql dosen't exists"
35     + exit 1
36     + fi
37     +fi
38     +
39     +if [ ! -d /var/lib/mysql/$cdrdbname ]; then
40     + mysqladmin create $cdrdbname
41     + if [ -e /usr/lib/freepbx/SQL/cdr_mysql_table.sql ]; then
42     + mysql $cdrdbname < /usr/lib/freepbx/SQL/cdr_mysql_table.sql
43     + else
44     + echo "Error: file /usr/lib/freepbx/SQL/cdr_mysql_table.sql dosen't exists"
45     + exit 1
46     + fi
47     +fi
48     +
49     +/usr/bin/mysql <<EOF
50     +USE mysql;
51     +
52     +REPLACE INTO user (
53     + host,
54     + user,
55     + password)
56     + VALUES (
57     + 'localhost',
58     + '$dbuser',
59     + PASSWORD ('$dbpass'));
60     +
61     +
62     +REPLACE INTO db (
63     + host,
64     + db,
65     + user,
66     + select_priv, insert_priv, update_priv, delete_priv,
67     + create_priv, alter_priv, index_priv, drop_priv, create_tmp_table_priv,
68     + grant_priv, lock_tables_priv, references_priv)
69     + VALUES (
70     + 'localhost',
71     + '$dbname',
72     + '$dbuser',
73     + 'Y', 'Y', 'Y', 'Y',
74     + 'Y', 'Y', 'Y', 'Y', 'Y',
75     + 'N', 'Y', 'Y');
76     +REPLACE INTO db (
77     + host,
78     + db,
79     + user,
80     + select_priv, insert_priv, update_priv, delete_priv,
81     + create_priv, alter_priv, index_priv, drop_priv, create_tmp_table_priv,
82     + grant_priv, lock_tables_priv, references_priv)
83     + VALUES (
84     + 'localhost',
85     + '$cdrdbname',
86     + '$dbuser',
87     + 'Y', 'Y', 'Y', 'Y',
88     + 'Y', 'Y', 'Y', 'Y', 'Y',
89     + 'N', 'Y', 'Y');
90     +
91     +
92     +FLUSH PRIVILEGES;
93     +
94     +EOF
95     +
96     +
97     +HERE
98     +}
99     +
100     diff -Nur -x '*.orig' -x '*.rej' smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/e-smith/sql/init/freepbx.sql mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/e-smith/sql/init/freepbx.sql
101     --- smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/e-smith/sql/init/freepbx.sql 2008-09-22 19:09:21.000000000 +0200
102     +++ mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/e-smith/sql/init/freepbx.sql 1970-01-01 01:00:00.000000000 +0100
103     @@ -1,51 +0,0 @@
104     -# GLPI MySQL init template
105     -#
106     -# This files creates/updates FreePBX's MySQL database infos
107     -
108     -
109     -USE mysql;
110     -
111     -CREATE DATABASE IF NOT EXISTS { $freepbx{DbName} };
112     -CREATE DATABASE IF NOT EXISTS { $freepbx{CdrDbName} };
113     -
114     -REPLACE INTO user (
115     - host,
116     - user,
117     - password)
118     - VALUES (
119     - 'localhost',
120     - '{ $freepbx{DbUser} }',
121     - PASSWORD ('{ $freepbx{DbPassword} }'));
122     -
123     -REPLACE INTO db (
124     - host,
125     - db,
126     - user,
127     - select_priv, insert_priv, update_priv, delete_priv,
128     - create_priv, alter_priv, index_priv, drop_priv, create_tmp_table_priv,
129     - grant_priv, lock_tables_priv, references_priv)
130     - VALUES (
131     - 'localhost',
132     - '{ $freepbx{DbName} }',
133     - '{ $freepbx{DbUser} }',
134     - 'Y', 'Y', 'Y', 'Y',
135     - 'Y', 'Y', 'Y', 'Y', 'N',
136     - 'N', 'N', 'N');
137     -
138     -REPLACE INTO db (
139     - host,
140     - db,
141     - user,
142     - select_priv, insert_priv, update_priv, delete_priv,
143     - create_priv, alter_priv, index_priv, drop_priv, create_tmp_table_priv,
144     - grant_priv, lock_tables_priv, references_priv)
145     - VALUES (
146     - 'localhost',
147     - '{ $freepbx{CdrDbName} }',
148     - '{ $freepbx{DbUser} }',
149     - 'Y', 'Y', 'Y', 'Y',
150     - 'Y', 'Y', 'Y', 'Y', 'N',
151     - 'N', 'N', 'N');
152     -
153     -FLUSH PRIVILEGES;
154     -
155     diff -Nur -x '*.orig' -x '*.rej' smeserver-freepbx-0.1/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/30freepbx_mysql_create_database mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/30freepbx_mysql_create_database
156     --- smeserver-freepbx-0.1/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/30freepbx_mysql_create_database 1970-01-01 01:00:00.000000000 +0100
157     +++ mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/30freepbx_mysql_create_database 2010-09-21 13:27:31.000000000 +0200
158     @@ -0,0 +1 @@
159     +PERMS=0540

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed