/[smeserver]/rpms/e-smith-mysql/sme10/e-smith-mysql-2.6.0-bz11120-mysql.init2systemd.patch
ViewVC logotype

Contents of /rpms/e-smith-mysql/sme10/e-smith-mysql-2.6.0-bz11120-mysql.init2systemd.patch

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


Revision 1.3 - (show annotations) (download)
Sun Dec 13 22:09:38 2020 UTC (3 years, 11 months ago) by jpp
Branch: MAIN
CVS Tags: e-smith-mysql-2_6_0-22_el7_sme, e-smith-mysql-2_6_0-20_el7_sme, e-smith-mysql-2_6_0-17_el7_sme, e-smith-mysql-2_6_0-18_el7_sme, e-smith-mysql-2_6_0-19_el7_sme, e-smith-mysql-2_6_0-21_el7_sme, HEAD
Changes since 1.2: +15 -0 lines
* Sun Dec 13 2020 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-17.sme
- expand 10mysql_upgrade and restart mysql.init on e-smith-mysql-update [SME: 11120]
  this to make sure mariadb upgrade fully and prevent residual 10mysql_upgrade stay in the way

1 diff -Nur e-smith-mysql-2.6.0.old/root/usr/lib/systemd/system/mysql.init.service e-smith-mysql-2.6.0/root/usr/lib/systemd/system/mysql.init.service
2 --- e-smith-mysql-2.6.0.old/root/usr/lib/systemd/system/mysql.init.service 1969-12-31 19:00:00.000000000 -0500
3 +++ e-smith-mysql-2.6.0/root/usr/lib/systemd/system/mysql.init.service 2020-12-07 22:37:53.569000000 -0500
4 @@ -0,0 +1,19 @@
5 +[Unit]
6 +SourcePath=/etc/rc.d/init.d/mysql.init
7 +Description=Koozali SME Server mysql DB injector for mariadb
8 +After=mariadb.service
9 +Requires=mariadb.service
10 +
11 +[Service]
12 +Type=oneshot
13 +Restart=no
14 +TimeoutSec=10min
15 +IgnoreSIGPIPE=no
16 +KillMode=process
17 +GuessMainPID=no
18 +RemainAfterExit=yes
19 +ExecStart=/etc/rc.d/init.d/mysql.init start
20 +ExecStop=/etc/rc.d/init.d/mysql.init stop
21 +
22 +[Install]
23 +WantedBy=sme-server.target
24 diff -Nur e-smith-mysql-2.6.0.old/root/etc/e-smith/templates/etc/e-smith/sql/init/10mysql_upgrade e-smith-mysql-2.6.0/root/etc/e-smith/templates/etc/e-smith/sql/init/10mysql_upgrade
25 --- e-smith-mysql-2.6.0.old/root/etc/e-smith/templates/etc/e-smith/sql/init/10mysql_upgrade 2020-12-09 23:20:20.435000000 -0500
26 +++ e-smith-mysql-2.6.0/root/etc/e-smith/templates/etc/e-smith/sql/init/10mysql_upgrade 2020-12-09 23:23:42.874000000 -0500
27 @@ -1,9 +1,8 @@
28 #!/bin/sh
29 /usr/bin/mysql_upgrade
30
31 -P=$(cat /var/run/mariadb/mariadb.pid)
32 /bin/rm /var/run/mariadb/mariadb.pid
33 -kill -TERM $P
34 +/usr/bin/systemctl restart mariadb.service
35 for i in $(seq 1 20);
36 do
37 if [ -f /var/run/mariadb/mariadb.pid ]
38 diff -Nur e-smith-mysql-2.6.0.old/createlinks e-smith-mysql-2.6.0/createlinks
39 --- e-smith-mysql-2.6.0.old/createlinks 2020-12-13 17:05:15.553000000 -0500
40 +++ e-smith-mysql-2.6.0/createlinks 2020-12-13 17:07:11.467000000 -0500
41 @@ -67,9 +67,10 @@
42 }
43
44 safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/mariadb");
45 -
46 +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/mysql.init");
47 # Move all database dumps except for mysql.dump to sql/init
48 event_link("mysql-load-tables", $event, "40");
49 +templates2events("/etc/e-smith/sql/init/10mysql_upgrade", $event);
50
51 # systemd-specific action mandatory for this package-update event
52 event_link("systemd-reload", $event, "89");

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