/[smecontribs]/rpms/smeserver-mysql57/contribs10/smeserver-mysql57-2.0.0-bz11877-systemd.patch
ViewVC logotype

Annotation of /rpms/smeserver-mysql57/contribs10/smeserver-mysql57-2.0.0-bz11877-systemd.patch

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


Revision 1.2 - (hide annotations) (download)
Wed Feb 23 21:36:46 2022 UTC (2 years, 2 months ago) by jpp
Branch: MAIN
Changes since 1.1: +25 -5 lines
* Wed Feb 23 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.0.0-13.sme
- adapt for SME10 [SME: 11877]
  systemd service files
  update event
  changing paths

1 jpp 1.1 diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/createlinks smeserver-mysql57-2.0.0/createlinks
2     --- smeserver-mysql57-2.0.0.old/createlinks 2022-02-23 14:04:50.137000000 -0500
3     +++ smeserver-mysql57-2.0.0/createlinks 2022-02-23 15:15:13.931000000 -0500
4     @@ -31,13 +31,16 @@
5     $event = "bootstrap-console-save";
6    
7     foreach (qw(
8     - /opt/rh/rh-mysql57/root/etc/my.cnf
9     - /opt/rh/rh-mysql57/root/etc/sysconfig/mysqld
10     - /var/service/mysql57-mysqld/set.password
11     + /etc/opt/rh/rh-mysql57/my.cnf
12     + /etc/opt/rh/rh-mysql57/sysconfig/mysqld
13     + /var/opt/rh/rh-mysql57/lib/mysql/set.password
14     + /etc/e-smith/sql/init57/10fix_privilege_tables
15     ))
16     -# /root/.my.cnf
17     {
18     - templates2events("$_", $event);
19     + templates2events("$_", qw(
20     + bootstrap-console-save
21     + smeserver-mysql57-update
22     + ));
23     }
24    
25     # Move all database dumps except for mysql.dump to sql/init
26     @@ -50,12 +53,9 @@
27    
28     safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/mysql57-mysqld");
29    
30     -templates2events("/etc/e-smith/sql/init57/10fix_privilege_tables",
31     - "bootstrap-console-save");
32     -
33     -safe_symlink("/opt/rh/rh-mysql57/root/var/run/mysqld", "root/var/run/mysql57-mysqld");
34     -
35     +#safe_symlink("/opt/rh/rh-mysql57/root/var/run/mysqld", "root/var/run/mysql57-mysqld");
36     +#/var/run/rh-mysql57-mysqld/
37    
38     # link configuration
39     safe_symlink("/etc/opt/rh/rh-mysql57", "root/opt/rh/rh-mysql57/root/etc");
40     -safe_symlink("/var/opt/rh/rh-mysql57", "root/opt/rh/rh-mysql57/root/var");
41     \ Pas de fin de ligne à la fin du fichier
42     +safe_symlink("/var/opt/rh/rh-mysql57", "root/opt/rh/rh-mysql57/root/var");
43 jpp 1.2 diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/events/actions/mysql57-delete-db-files smeserver-mysql57-2.0.0/root/etc/e-smith/events/actions/mysql57-delete-db-files
44     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/events/actions/mysql57-delete-db-files 2022-02-23 14:04:50.076000000 -0500
45     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/events/actions/mysql57-delete-db-files 2022-02-23 16:31:55.730000000 -0500
46     @@ -1,3 +1,3 @@
47     #! /bin/sh
48    
49     -cd /opt/rh/rh-mysql57/root/var/lib/mysql && find . -type f | xargs rm -f
50     +cd /var/opt/rh/rh-mysql57/lib/mysql && find . -type f | xargs rm -f
51     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/events/actions/mysql57-load-tables smeserver-mysql57-2.0.0/root/etc/e-smith/events/actions/mysql57-load-tables
52     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/events/actions/mysql57-load-tables 2022-02-23 14:04:50.385000000 -0500
53     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/events/actions/mysql57-load-tables 2022-02-23 16:32:24.143000000 -0500
54     @@ -7,7 +7,7 @@
55     exit 0
56     fi
57     /bin/rm -f /home/e-smith/db/mysql57/information_schema.dump
58     -if [ ! -f /opt/rh/rh-mysql57/root/var/lib/mysql/mysql/user.frm ]
59     +if [ ! -f /var/opt/rh/rh-mysql57/lib/mysql/mysql/user.frm ]
60     then
61     for db in $(ls /home/e-smith/db/mysql57/*.dump 2> /dev/null | grep -v '/mysql.dump')
62     do
63 jpp 1.1 diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/000readme smeserver-mysql57-2.0.0/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/000readme
64     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/000readme 1969-12-31 19:00:00.000000000 -0500
65     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/000readme 2022-02-23 14:04:50.102000000 -0500
66     @@ -0,0 +1,33 @@
67     +###########################################################
68     +# Here is a cheat-sheet for this file as of MySQL 4.0.14
69     +# 2003-12-18 - tony_clayton@mitel.com
70     +#
71     +# 1. The mysqld binary reads options from the [mysqld] section,
72     +# and then overrides those values with any passed-in
73     +# arguments.
74     +#
75     +# 2. The mysqld_safe script reads options from the following
76     +# sections in order, overriding any previous values with newer
77     +# ones:
78     +# [mysqld] [server] [mysqld_safe] [safe_mysqld]
79     +# It then overrides those values with any passed-in
80     +# arguments, and invokes the mysqld binary (see #1 above) with
81     +# the resulting argument list.
82     +#
83     +# * The server and safe_mysqld sections are deprecated in
84     +# favour of mysqld and mysqld_safe respectively.
85     +#
86     +# 3. The mysql or mysqld initscript reads options from the
87     +# following sections in order, overriding any previous values
88     +# with newer ones:
89     +# [mysqld] [mysql_server] [mysql.server]
90     +# It then overrides those values with any passed-in arguments,
91     +# and invokes the mysqld_safe script (see #2 above) with the
92     +# resulting argument list.
93     +#
94     +# * The SMEServer doesn't have any need for initscript-only
95     +# options, so we don't use mysql_server and mysql.server
96     +# sections.
97     +#
98     +###########################################################
99     +
100     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/005mysqld smeserver-mysql57-2.0.0/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/005mysqld
101     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/005mysqld 1969-12-31 19:00:00.000000000 -0500
102     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/005mysqld 2022-02-23 14:04:50.102000000 -0500
103     @@ -0,0 +1 @@
104     +[mysqld]
105     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/006logfile smeserver-mysql57-2.0.0/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/006logfile
106     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/006logfile 1969-12-31 19:00:00.000000000 -0500
107     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/006logfile 2022-02-23 14:04:50.153000000 -0500
108     @@ -0,0 +1,4 @@
109     +log-error=/var/log/mysql57-mysqld.log
110     +explicit_defaults_for_timestamp = 1
111     +log_timestamps = SYSTEM
112     +
113     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/006pid-file smeserver-mysql57-2.0.0/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/006pid-file
114     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/006pid-file 1969-12-31 19:00:00.000000000 -0500
115     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/006pid-file 2022-02-23 14:04:50.144000000 -0500
116     @@ -0,0 +1 @@
117     +pid-file=/var/run/rh-mysql57-mysqld/mysqld.pid
118     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/007basedir smeserver-mysql57-2.0.0/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/007basedir
119     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/007basedir 1969-12-31 19:00:00.000000000 -0500
120     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/007basedir 2022-02-23 14:04:50.103000000 -0500
121     @@ -0,0 +1 @@
122     +basedir=/opt/rh/rh-mysql57/root/usr
123     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/008datadir smeserver-mysql57-2.0.0/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/008datadir
124     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/008datadir 1969-12-31 19:00:00.000000000 -0500
125 jpp 1.2 +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/008datadir 2022-02-23 16:33:12.118000000 -0500
126 jpp 1.1 @@ -0,0 +1 @@
127 jpp 1.2 +datadir=/var/opt/rh/rh-mysql57/lib/mysql
128 jpp 1.1 diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/0095lcmessagesdir smeserver-mysql57-2.0.0/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/0095lcmessagesdir
129     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/0095lcmessagesdir 1969-12-31 19:00:00.000000000 -0500
130     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/0095lcmessagesdir 2022-02-23 14:04:50.144000000 -0500
131     @@ -0,0 +1 @@
132     +lc-messages-dir=/opt/rh/rh-mysql57/root/usr/share/rh-mysql57-mysql/english/
133     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/009socket smeserver-mysql57-2.0.0/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/009socket
134     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/009socket 1969-12-31 19:00:00.000000000 -0500
135     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/009socket 2022-02-23 14:04:50.104000000 -0500
136     @@ -0,0 +1,12 @@
137     +socket=/var/lib/mysql/mysql57.sock
138     +{
139     + use esmith::ConfigDB;
140     + my $db = esmith::ConfigDB->open or die "Couldn't open ConfigDB\n";
141     + my $mysql57mysqld = $db->get('mysql57-mysqld') or die "not found";
142     +
143     + my $localonly = $mysql57mysqld->prop(LocalNetworkingOnly) || "no";
144     + $OUT = ($localonly eq 'yes') ? "skip-networking\n" : "# networking is enabled\n";
145     + # define port
146     + my $port = $mysql57mysqld->prop('port') || "3309";
147     + $OUT .= ($localonly eq 'yes') ? "#no port as skip-networking\n" : "port=$port\n";
148     +}
149     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/011max_allowed_packet smeserver-mysql57-2.0.0/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/011max_allowed_packet
150     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/011max_allowed_packet 1969-12-31 19:00:00.000000000 -0500
151     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/011max_allowed_packet 2022-02-23 14:04:50.135000000 -0500
152     @@ -0,0 +1 @@
153     +max_allowed_packet=16M
154     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/011user smeserver-mysql57-2.0.0/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/011user
155     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/011user 1969-12-31 19:00:00.000000000 -0500
156     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/011user 2022-02-23 14:04:50.136000000 -0500
157     @@ -0,0 +1 @@
158     +user=mysql
159     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/040mysqld_safe smeserver-mysql57-2.0.0/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/040mysqld_safe
160     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/040mysqld_safe 1969-12-31 19:00:00.000000000 -0500
161     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/my.cnf/040mysqld_safe 2022-02-23 14:04:50.136000000 -0500
162     @@ -0,0 +1,4 @@
163     +
164     +{ # allow backwards-compatibility with safe_mysqld (mysql < 4.0)
165     + -f "/opt/rh/rh-mysql57/root/usr/bin/mysqld_safe" ? "[mysqld_safe]" : "[safe_mysqld]";
166     +}
167     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/sysconfig/mysqld/10default smeserver-mysql57-2.0.0/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/sysconfig/mysqld/10default
168     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/sysconfig/mysqld/10default 1969-12-31 19:00:00.000000000 -0500
169     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates/etc/opt/rh/rh-mysql57/sysconfig/mysqld/10default 2022-02-23 14:04:50.136000000 -0500
170     @@ -0,0 +1,2 @@
171     +socket=/var/lib/mysql/mysql57.sock
172     +MYSQLD_OPTIONS=--skip-networking
173     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/000readme smeserver-mysql57-2.0.0/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/000readme
174     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/000readme 2022-02-23 14:04:50.102000000 -0500
175     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/000readme 1969-12-31 19:00:00.000000000 -0500
176     @@ -1,33 +0,0 @@
177     -###########################################################
178     -# Here is a cheat-sheet for this file as of MySQL 4.0.14
179     -# 2003-12-18 - tony_clayton@mitel.com
180     -#
181     -# 1. The mysqld binary reads options from the [mysqld] section,
182     -# and then overrides those values with any passed-in
183     -# arguments.
184     -#
185     -# 2. The mysqld_safe script reads options from the following
186     -# sections in order, overriding any previous values with newer
187     -# ones:
188     -# [mysqld] [server] [mysqld_safe] [safe_mysqld]
189     -# It then overrides those values with any passed-in
190     -# arguments, and invokes the mysqld binary (see #1 above) with
191     -# the resulting argument list.
192     -#
193     -# * The server and safe_mysqld sections are deprecated in
194     -# favour of mysqld and mysqld_safe respectively.
195     -#
196     -# 3. The mysql or mysqld initscript reads options from the
197     -# following sections in order, overriding any previous values
198     -# with newer ones:
199     -# [mysqld] [mysql_server] [mysql.server]
200     -# It then overrides those values with any passed-in arguments,
201     -# and invokes the mysqld_safe script (see #2 above) with the
202     -# resulting argument list.
203     -#
204     -# * The SMEServer doesn't have any need for initscript-only
205     -# options, so we don't use mysql_server and mysql.server
206     -# sections.
207     -#
208     -###########################################################
209     -
210     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/005mysqld smeserver-mysql57-2.0.0/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/005mysqld
211     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/005mysqld 2022-02-23 14:04:50.102000000 -0500
212     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/005mysqld 1969-12-31 19:00:00.000000000 -0500
213     @@ -1 +0,0 @@
214     -[mysqld]
215     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/006logfile smeserver-mysql57-2.0.0/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/006logfile
216     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/006logfile 2022-02-23 14:04:50.153000000 -0500
217     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/006logfile 1969-12-31 19:00:00.000000000 -0500
218     @@ -1,4 +0,0 @@
219     -log-error=/var/log/mysql57-mysqld.log
220     -explicit_defaults_for_timestamp = 1
221     -log_timestamps = SYSTEM
222     -
223     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/006pid-file smeserver-mysql57-2.0.0/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/006pid-file
224     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/006pid-file 2022-02-23 14:04:50.144000000 -0500
225     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/006pid-file 1969-12-31 19:00:00.000000000 -0500
226     @@ -1 +0,0 @@
227     -pid-file=/var/run/rh-mysql57-mysqld/mysqld.pid
228     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/007basedir smeserver-mysql57-2.0.0/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/007basedir
229     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/007basedir 2022-02-23 14:04:50.103000000 -0500
230     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/007basedir 1969-12-31 19:00:00.000000000 -0500
231     @@ -1 +0,0 @@
232     -basedir=/opt/rh/rh-mysql57/root/usr
233     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/008datadir smeserver-mysql57-2.0.0/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/008datadir
234     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/008datadir 2022-02-23 14:04:50.104000000 -0500
235     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/008datadir 1969-12-31 19:00:00.000000000 -0500
236     @@ -1 +0,0 @@
237     -datadir=/opt/rh/rh-mysql57/root/var/lib/mysql
238     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/0095lcmessagesdir smeserver-mysql57-2.0.0/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/0095lcmessagesdir
239     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/0095lcmessagesdir 2022-02-23 14:04:50.144000000 -0500
240     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/0095lcmessagesdir 1969-12-31 19:00:00.000000000 -0500
241     @@ -1 +0,0 @@
242     -lc-messages-dir=/opt/rh/rh-mysql57/root/usr/share/rh-mysql57-mysql/english/
243     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/009socket smeserver-mysql57-2.0.0/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/009socket
244     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/009socket 2022-02-23 14:04:50.104000000 -0500
245     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/009socket 1969-12-31 19:00:00.000000000 -0500
246     @@ -1,12 +0,0 @@
247     -socket=/var/lib/mysql/mysql57.sock
248     -{
249     - use esmith::ConfigDB;
250     - my $db = esmith::ConfigDB->open or die "Couldn't open ConfigDB\n";
251     - my $mysql57mysqld = $db->get('mysql57-mysqld') or die "not found";
252     -
253     - my $localonly = $mysql57mysqld->prop(LocalNetworkingOnly) || "no";
254     - $OUT = ($localonly eq 'yes') ? "skip-networking\n" : "# networking is enabled\n";
255     - # define port
256     - my $port = $mysql57mysqld->prop('port') || "3309";
257     - $OUT .= ($localonly eq 'yes') ? "#no port as skip-networking\n" : "port=$port\n";
258     -}
259     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/011max_allowed_packet smeserver-mysql57-2.0.0/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/011max_allowed_packet
260     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/011max_allowed_packet 2022-02-23 14:04:50.135000000 -0500
261     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/011max_allowed_packet 1969-12-31 19:00:00.000000000 -0500
262     @@ -1 +0,0 @@
263     -max_allowed_packet=16M
264     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/011user smeserver-mysql57-2.0.0/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/011user
265     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/011user 2022-02-23 14:04:50.136000000 -0500
266     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/011user 1969-12-31 19:00:00.000000000 -0500
267     @@ -1 +0,0 @@
268     -user=mysql
269     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/040mysqld_safe smeserver-mysql57-2.0.0/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/040mysqld_safe
270     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/040mysqld_safe 2022-02-23 14:04:50.136000000 -0500
271     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/my.cnf/040mysqld_safe 1969-12-31 19:00:00.000000000 -0500
272     @@ -1,4 +0,0 @@
273     -
274     -{ # allow backwards-compatibility with safe_mysqld (mysql < 4.0)
275     - -f "/opt/rh/rh-mysql57/root/usr/bin/mysqld_safe" ? "[mysqld_safe]" : "[safe_mysqld]";
276     -}
277     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/sysconfig/mysqld/10default smeserver-mysql57-2.0.0/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/sysconfig/mysqld/10default
278     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/sysconfig/mysqld/10default 2022-02-23 14:04:50.136000000 -0500
279     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates/opt/rh/rh-mysql57/root/etc/sysconfig/mysqld/10default 1969-12-31 19:00:00.000000000 -0500
280     @@ -1,2 +0,0 @@
281     -socket=/var/lib/mysql/mysql57.sock
282     -MYSQLD_OPTIONS=--skip-networking
283     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates.metadata/var/opt/rh/rh-mysql57/lib/mysql/set.password smeserver-mysql57-2.0.0/root/etc/e-smith/templates.metadata/var/opt/rh/rh-mysql57/lib/mysql/set.password
284     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates.metadata/var/opt/rh/rh-mysql57/lib/mysql/set.password 1969-12-31 19:00:00.000000000 -0500
285     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates.metadata/var/opt/rh/rh-mysql57/lib/mysql/set.password 2017-02-19 09:44:53.000000000 -0500
286     @@ -0,0 +1 @@
287     +PERMS=0400
288     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates.metadata/var/service/mysql57-mysqld/set.password smeserver-mysql57-2.0.0/root/etc/e-smith/templates.metadata/var/service/mysql57-mysqld/set.password
289     --- smeserver-mysql57-2.0.0.old/root/etc/e-smith/templates.metadata/var/service/mysql57-mysqld/set.password 2017-02-19 09:44:53.000000000 -0500
290     +++ smeserver-mysql57-2.0.0/root/etc/e-smith/templates.metadata/var/service/mysql57-mysqld/set.password 1969-12-31 19:00:00.000000000 -0500
291     @@ -1 +0,0 @@
292     -PERMS=0400
293     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/etc/rc.d/init.d/mysql57-mysql.init smeserver-mysql57-2.0.0/root/etc/rc.d/init.d/mysql57-mysql.init
294     --- smeserver-mysql57-2.0.0.old/root/etc/rc.d/init.d/mysql57-mysql.init 2022-02-23 14:04:50.065000000 -0500
295     +++ smeserver-mysql57-2.0.0/root/etc/rc.d/init.d/mysql57-mysql.init 1969-12-31 19:00:00.000000000 -0500
296     @@ -1,65 +0,0 @@
297     -#!/bin/sh
298     -
299     -#----------------------------------------------------------------------
300     -# copyright (C) 2002 Mitel Networks Corporation
301     -#
302     -# This program is free software; you can redistribute it and/or modify
303     -# it under the terms of the GNU General Public License as published by
304     -# the Free Software Foundation; either version 2 of the License, or
305     -# (at your option) any later version.
306     -#
307     -# This program is distributed in the hope that it will be useful,
308     -# but WITHOUT ANY WARRANTY; without even the implied warranty of
309     -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
310     -# GNU General Public License for more details.
311     -#
312     -# You should have received a copy of the GNU General Public License
313     -# along with this program; if not, write to the Free Software
314     -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
315     -#
316     -# Technical support for this program is available from Mitel Networks
317     -# Please visit our web site www.mitel.com/sme/ for details.
318     -#----------------------------------------------------------------------
319     -
320     -# Source function library.
321     -. /etc/rc.d/init.d/functions
322     -
323     -if [ $# -lt 1 ]; then
324     - echo "Usage: $0 <start|restart>" 1>&2
325     - exit 1
326     -fi
327     -# We should only do something if $1 is 'start'.
328     -if [ $1 != "start" ] && [ $1 != "restart" ]; then
329     - exit 0
330     -fi
331     -
332     -for i in $(seq 1 10)
333     -do
334     - if test -e /var/lib/mysql/mysql.sock
335     - then
336     - exit_value=0
337     - HOME=/root
338     - export HOME
339     - for link in $(find /etc/e-smith/sql/init57 -type f -o -type l | sort)
340     - do
341     - F=$(basename $link | sed s/S[0-9][0-9]//)
342     - case $F in
343     - *.sql)
344     - action "Loading $F into mysql" /usr/bin/mysql < $link && /bin/rm $link
345     - ;;
346     - *)
347     - action "Loading $F into mysql" $link && /bin/rm $link
348     - ;;
349     - esac
350     - # Record any failure for the final return value.
351     - if [ $? -ne 0 ]; then
352     - exit_value=1
353     - fi
354     - done
355     - exit $exit_value
356     - fi
357     - echo "Waiting for mysql to startup" >&2
358     - sleep 2
359     -done
360     -
361     -exit 1
362     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/sbin/e-smith/systemd/mysql57-initialize smeserver-mysql57-2.0.0/root/sbin/e-smith/systemd/mysql57-initialize
363     --- smeserver-mysql57-2.0.0.old/root/sbin/e-smith/systemd/mysql57-initialize 1969-12-31 19:00:00.000000000 -0500
364 jpp 1.2 +++ smeserver-mysql57-2.0.0/root/sbin/e-smith/systemd/mysql57-initialize 2022-02-23 16:31:21.174000000 -0500
365 jpp 1.1 @@ -0,0 +1,32 @@
366     +#!/bin/bash
367 jpp 1.2 +datadir="/var/opt/rh/rh-mysql57/lib/mysql"
368 jpp 1.1 +
369 jpp 1.2 +if [ ! -f $datadir/mysql/user.frm ]
370 jpp 1.1 +then
371     + touch /var/log/mysql57-mysqld.log
372     + chown mysql:mysql /var/log/mysql57-mysqld.log
373     + chmod 0640 /var/log/mysql57-mysqld.log
374     + echo "Initializing MySQL database"
375     + /opt/rh/rh-mysql57/root/usr/libexec/mysqld --initialize --datadir="$datadir" --user="mysql"
376     + ret=$?
377     + if [ $ret -ne 0 ] ; then
378     + echo "Initialization of MySQL database failed." >&2
379     + echo "Perhaps /etc/opt/rh/rh-mysql57/my.cnf is misconfigured." >&2
380     + # Clean up any partially-created database files
381     + if [ ! -e "$datadir/mysql/user.frm" ] ; then
382     + rm -rf "$datadir"/*
383     + fi
384     + exit $ret
385     + fi
386     + # set root password
387     + /opt/rh/rh-mysql57/root/usr/libexec/mysqld --bootstrap --datadir="$datadir" --user="mysql" < $datadir/set.password
388     + # upgrade does not need to be run on a fresh datadir
389     + echo "5.7.24" >"$datadir/mysql_upgrade_info"
390     + # In case we're running as root, make sure files are owned properly
391     + chown -R "mysql:mysql" "$datadir"
392     +
393     + if [ -f /home/e-smith/db/mysql57/mysql.dump ]
394     + then
395     + /sbin/e-smith/expand-template /etc/e-smith/sql/init57/00_restore_dumped_dbs
396     + fi
397     +fi
398     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/sbin/e-smith/systemd/mysql57-mysql.init smeserver-mysql57-2.0.0/root/sbin/e-smith/systemd/mysql57-mysql.init
399     --- smeserver-mysql57-2.0.0.old/root/sbin/e-smith/systemd/mysql57-mysql.init 1969-12-31 19:00:00.000000000 -0500
400     +++ smeserver-mysql57-2.0.0/root/sbin/e-smith/systemd/mysql57-mysql.init 2022-02-23 14:04:50.065000000 -0500
401     @@ -0,0 +1,65 @@
402     +#!/bin/sh
403     +
404     +#----------------------------------------------------------------------
405     +# copyright (C) 2002 Mitel Networks Corporation
406     +#
407     +# This program is free software; you can redistribute it and/or modify
408     +# it under the terms of the GNU General Public License as published by
409     +# the Free Software Foundation; either version 2 of the License, or
410     +# (at your option) any later version.
411     +#
412     +# This program is distributed in the hope that it will be useful,
413     +# but WITHOUT ANY WARRANTY; without even the implied warranty of
414     +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
415     +# GNU General Public License for more details.
416     +#
417     +# You should have received a copy of the GNU General Public License
418     +# along with this program; if not, write to the Free Software
419     +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
420     +#
421     +# Technical support for this program is available from Mitel Networks
422     +# Please visit our web site www.mitel.com/sme/ for details.
423     +#----------------------------------------------------------------------
424     +
425     +# Source function library.
426     +. /etc/rc.d/init.d/functions
427     +
428     +if [ $# -lt 1 ]; then
429     + echo "Usage: $0 <start|restart>" 1>&2
430     + exit 1
431     +fi
432     +# We should only do something if $1 is 'start'.
433     +if [ $1 != "start" ] && [ $1 != "restart" ]; then
434     + exit 0
435     +fi
436     +
437     +for i in $(seq 1 10)
438     +do
439     + if test -e /var/lib/mysql/mysql.sock
440     + then
441     + exit_value=0
442     + HOME=/root
443     + export HOME
444     + for link in $(find /etc/e-smith/sql/init57 -type f -o -type l | sort)
445     + do
446     + F=$(basename $link | sed s/S[0-9][0-9]//)
447     + case $F in
448     + *.sql)
449     + action "Loading $F into mysql" /usr/bin/mysql < $link && /bin/rm $link
450     + ;;
451     + *)
452     + action "Loading $F into mysql" $link && /bin/rm $link
453     + ;;
454     + esac
455     + # Record any failure for the final return value.
456     + if [ $? -ne 0 ]; then
457     + exit_value=1
458     + fi
459     + done
460     + exit $exit_value
461     + fi
462     + echo "Waiting for mysql to startup" >&2
463     + sleep 2
464     +done
465     +
466     +exit 1
467     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/usr/lib/systemd/system/mysql57-mysql.init.service smeserver-mysql57-2.0.0/root/usr/lib/systemd/system/mysql57-mysql.init.service
468     --- smeserver-mysql57-2.0.0.old/root/usr/lib/systemd/system/mysql57-mysql.init.service 1969-12-31 19:00:00.000000000 -0500
469     +++ smeserver-mysql57-2.0.0/root/usr/lib/systemd/system/mysql57-mysql.init.service 2022-02-23 15:38:51.471000000 -0500
470     @@ -0,0 +1,20 @@
471     +[Unit]
472     +SourcePath=/sbin/e-smith/systemd/mysql57-mysql.init
473     +Description=Koozali SME Server mysql DB injector for mysql57
474     +After=mysql57-mysql.service
475     +Requires=mysql57-mysql.service
476     +
477     +[Service]
478     +Type=oneshot
479     +Restart=no
480     +TimeoutSec=10min
481     +IgnoreSIGPIPE=no
482     +KillMode=process
483     +GuessMainPID=no
484     +RemainAfterExit=yes
485     +ExecStart=/sbin/e-smith/systemd/mysql57-mysql.init start
486     +ExecStop=/sbin/e-smith/systemd/mysql57-mysql.init stop
487     +
488     +[Install]
489     +WantedBy=sme-server.target
490     +
491     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/usr/lib/systemd/system/mysql57-mysql.service smeserver-mysql57-2.0.0/root/usr/lib/systemd/system/mysql57-mysql.service
492     --- smeserver-mysql57-2.0.0.old/root/usr/lib/systemd/system/mysql57-mysql.service 1969-12-31 19:00:00.000000000 -0500
493     +++ smeserver-mysql57-2.0.0/root/usr/lib/systemd/system/mysql57-mysql.service 2022-02-23 15:24:21.955000000 -0500
494     @@ -0,0 +1,50 @@
495     +[Unit]
496     +Description=MySQL 5.7 database server
497     +After=syslog.target
498     +After=network.target
499     +
500     +[Service]
501     +Type=simple
502     +User=root
503     +Group=root
504     +
505     +#ours : we need root user as + and ! are not yet supported
506     +ExecStartPre=-/sbin/e-smith/service-status mariadb
507     +ExecStartPre=-/sbin/e-smith/expand-template /var/opt/rh/rh-mysql57/lib/mysql/set.password
508     +ExecStartPre=-/sbin/e-smith/expand-template /root/.my.cnf
509     +ExecStartPre=-/sbin/e-smith/expand-template /etc/opt/rh/rh-mysql57/my.cnf
510     +ExecStartPre=/sbin/e-smith/systemd/mysql57-initialize
511     +
512     +# We want to start server only inside "scl enable" invocation
513     +ExecStartPre=/usr/bin/scl enable $RH_MYSQL57_SCLS_ENABLED -- /usr/bin/scl_enabled rh-mysql57
514     +ExecStartPre=/usr/bin/scl enable $RH_MYSQL57_SCLS_ENABLED -- /opt/rh/rh-mysql57/root/usr/libexec/mysql-check-socket
515     +ExecStartPre=/usr/bin/scl enable $RH_MYSQL57_SCLS_ENABLED -- /opt/rh/rh-mysql57/root/usr/libexec/mysql-prepare-db-dir %n
516     +
517     +# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
518     +# per bug #547485
519     +ExecStart=/opt/rh/rh-mysql57/root/usr/libexec/mysqld-scl-helper enable $RH_MYSQL57_SCLS_ENABLED -- \
520     + /opt/rh/rh-mysql57/root/usr/libexec/mysqld \
521     + --defaults-file= /etc/opt/rh/rh-mysql57/my.cnf
522     + --datadir=/var/opt/rh/rh-mysql57/lib/mysql \
523     + --user=mysql \
524     + --daemonize \
525     + --basedir=/opt/rh/rh-mysql57/root/usr \
526     + --pid-file=/var/run/rh-mysql57-mysqld/mysqld.pid
527     +
528     +ExecStartPost=/usr/bin/scl enable $RH_MYSQL57_SCLS_ENABLED -- /opt/rh/rh-mysql57/root/usr/libexec/mysql-check-upgrade
529     +ExecStopPost=/usr/bin/scl enable $RH_MYSQL57_SCLS_ENABLED -- /opt/rh/rh-mysql57/root/usr/libexec/mysql-wait-stop
530     +
531     +#ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID
532     +
533     +# Give a reasonable amount of time for the server to start up/shut down
534     +TimeoutSec=300
535     +
536     +# Place temp files in a secure directory, not /tmp
537     +PrivateTmp=true
538     +
539     +Restart=on-failure
540     +
541     +RestartPreventExitStatus=1
542     +
543     +[Install]
544     +WantedBy=sme-server.target
545     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/var/service/mysql57-mysqld/control/d smeserver-mysql57-2.0.0/root/var/service/mysql57-mysqld/control/d
546     --- smeserver-mysql57-2.0.0.old/root/var/service/mysql57-mysqld/control/d 2022-02-23 14:04:50.091000000 -0500
547     +++ smeserver-mysql57-2.0.0/root/var/service/mysql57-mysqld/control/d 1969-12-31 19:00:00.000000000 -0500
548     @@ -1,3 +0,0 @@
549     -#! /bin/sh
550     -
551     -exec kill -TERM $(cat /opt/rh/rh-mysql57/root/var/run/mysqld/mysqld.pid)
552     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/var/service/mysql57-mysqld/control/i smeserver-mysql57-2.0.0/root/var/service/mysql57-mysqld/control/i
553     --- smeserver-mysql57-2.0.0.old/root/var/service/mysql57-mysqld/control/i 2022-02-23 14:04:50.092000000 -0500
554     +++ smeserver-mysql57-2.0.0/root/var/service/mysql57-mysqld/control/i 1969-12-31 19:00:00.000000000 -0500
555     @@ -1,3 +0,0 @@
556     -#! /bin/sh
557     -
558     -exec kill -INT $(cat /opt/rh/rh-mysql57/root/var/run/mysqld/mysqld.pid)
559     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/var/service/mysql57-mysqld/control/q smeserver-mysql57-2.0.0/root/var/service/mysql57-mysqld/control/q
560     --- smeserver-mysql57-2.0.0.old/root/var/service/mysql57-mysqld/control/q 2022-02-23 14:04:50.092000000 -0500
561     +++ smeserver-mysql57-2.0.0/root/var/service/mysql57-mysqld/control/q 1969-12-31 19:00:00.000000000 -0500
562     @@ -1,3 +0,0 @@
563     -#! /bin/sh
564     -
565     -exec kill -QUIT $(cat /opt/rh/rh-mysql57/root/var/run/mysqld/mysqld.pid)
566     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/var/service/mysql57-mysqld/control/t smeserver-mysql57-2.0.0/root/var/service/mysql57-mysqld/control/t
567     --- smeserver-mysql57-2.0.0.old/root/var/service/mysql57-mysqld/control/t 2022-02-23 14:04:50.093000000 -0500
568     +++ smeserver-mysql57-2.0.0/root/var/service/mysql57-mysqld/control/t 1969-12-31 19:00:00.000000000 -0500
569     @@ -1,3 +0,0 @@
570     -#! /bin/sh
571     -
572     -exec kill -TERM $(cat /opt/rh/rh-mysql57/root/var/run/mysqld/mysqld.pid)
573     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/var/service/mysql57-mysqld/log/run smeserver-mysql57-2.0.0/root/var/service/mysql57-mysqld/log/run
574     --- smeserver-mysql57-2.0.0.old/root/var/service/mysql57-mysqld/log/run 2017-02-19 09:44:53.000000000 -0500
575     +++ smeserver-mysql57-2.0.0/root/var/service/mysql57-mysqld/log/run 1969-12-31 19:00:00.000000000 -0500
576     @@ -1,26 +0,0 @@
577     -#!/bin/sh
578     -
579     - #----------------------------------------------------------------------
580     - # copyright (C) 2003 Mitel Networks Corporation
581     - #
582     - # This program is free software; you can redistribute it and/or modify
583     - # it under the terms of the GNU General Public License as published by
584     - # the Free Software Foundation; either version 2 of the License, or
585     - # (at your option) any later version.
586     - #
587     - # This program is distributed in the hope that it will be useful,
588     - # but WITHOUT ANY WARRANTY; without even the implied warranty of
589     - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
590     - # GNU General Public License for more details.
591     - #
592     - # You should have received a copy of the GNU General Public License
593     - # along with this program; if not, write to the Free Software
594     - # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
595     - #
596     - # Technical support for this program is available from Mitel Networks
597     - # Please visit our web site www.mitel.com/sme/ for details.
598     - #----------------------------------------------------------------------
599     - exec \
600     - /usr/local/bin/setuidgid smelog \
601     - /usr/local/bin/multilog t s5000000 \
602     - /var/log/mysql57-mysqld
603     diff -Nur --no-dereference smeserver-mysql57-2.0.0.old/root/var/service/mysql57-mysqld/run smeserver-mysql57-2.0.0/root/var/service/mysql57-mysqld/run
604     --- smeserver-mysql57-2.0.0.old/root/var/service/mysql57-mysqld/run 2022-02-23 14:04:50.154000000 -0500
605     +++ smeserver-mysql57-2.0.0/root/var/service/mysql57-mysqld/run 1969-12-31 19:00:00.000000000 -0500
606     @@ -1,60 +0,0 @@
607     -#! /bin/sh
608     -
609     -datadir="/opt/rh/rh-mysql57/root/var/lib/mysql"
610     -
611     -# We have to re-enable SCL environment, because /sbin/service
612     -# clears almost all environment variables.
613     -# Since X_SCLS is cleared as well, we lose information about other
614     -# collections enabled.
615     -. /opt/rh/rh-mysql57/service-environment
616     -for sclname in $RH_MYSQL57_SCLS_ENABLED ; do
617     - . /opt/rh/$sclname/enable
618     - export X_SCLS="$X_SCLS $sclname"
619     -done
620     -
621     -# we want start daemon only inside "scl enable" invocation
622     -if ! scl_enabled $sclname ; then
623     - echo "Collection $sclname has to be listed in /opt/rh/rh-mysql57/service-environment"
624     - exit 1
625     -fi
626     -
627     -exec 2>&1
628     -
629     -if [ ! -f /opt/rh/rh-mysql57/root/var/lib/mysql/mysql/user.frm ]
630     -then
631     - touch /var/log/mysql57-mysqld.log
632     - chown mysql:mysql /var/log/mysql57-mysqld.log
633     - chmod 0640 /var/log/mysql57-mysqld.log
634     - echo "Initializing MySQL database"
635     - /opt/rh/rh-mysql57/root/usr/libexec/mysqld --initialize --datadir="$datadir" --user="mysql"
636     - ret=$?
637     - if [ $ret -ne 0 ] ; then
638     - echo "Initialization of MySQL database failed." >&2
639     - echo "Perhaps /etc/opt/rh/rh-mysql57/my.cnf is misconfigured." >&2
640     - # Clean up any partially-created database files
641     - if [ ! -e "$datadir/mysql/user.frm" ] ; then
642     - rm -rf "$datadir"/*
643     - fi
644     - exit $ret
645     - fi
646     - # set root password
647     - /opt/rh/rh-mysql57/root/usr/libexec/mysqld --bootstrap --datadir="$datadir" --user="mysql" < ./set.password
648     - # upgrade does not need to be run on a fresh datadir
649     - echo "5.7.16" >"$datadir/mysql_upgrade_info"
650     - # In case we're running as root, make sure files are owned properly
651     - chown -R "mysql:mysql" "$datadir"
652     -
653     - if [ -f /home/e-smith/db/mysql57/mysql.dump ]
654     - then
655     - /sbin/e-smith/expand-template /etc/e-smith/sql/init57/00_restore_dumped_dbs
656     - fi
657     -fi
658     -
659     -exec /opt/rh/rh-mysql57/root/usr/libexec/mysqld \
660     - --defaults-file=/opt/rh/rh-mysql57/root/etc/my.cnf \
661     - --basedir=/opt/rh/rh-mysql57/root/usr \
662     - --datadir=$datadir \
663     - --user=mysql \
664     - --pid-file=/var/run/rh-mysql57-mysqld/mysqld.pid \
665     - --socket=/var/lib/mysql/mysql57.sock \
666     - --lc-messages-dir=/opt/rh/rh-mysql57/root/usr/share/rh-mysql57-mysql/english/

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