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

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