/[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.5 - (show annotations) (download)
Fri Feb 25 02:34:47 2022 UTC (2 years, 2 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-mysql57-2_0_0-15_el7_sme, smeserver-mysql57-2_0_0-14_el7_sme, HEAD
Changes since 1.4: +12 -0 lines
* Thu Feb 24 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.0.0-14.sme
- expand phpmyadmin config file on install [SME: 11877]

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

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