diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-09-08 19:42:53 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-09-21 13:31:37 +0200 |
commit | 21d157abaaffe41382ccb0524d8f255f79bec8b1 (patch) | |
tree | d3862876b27c0672eb783543cd59635e90e55683 /support-files | |
parent | 5c83305c4c395cf79f19c6fc63e8d566e3815598 (diff) | |
download | mariadb-git-21d157abaaffe41382ccb0524d8f255f79bec8b1.tar.gz |
MDEV-14560 Extra engines enabled through additional config are not loaded on first installation
RPM solution:
Make all server plugins to restart the server when installed.
To avoid multiple server restarts, do it only once in posttrans scriptlet.
Add support for CPACK_RPM_<component>_POST_TRANS_SCRIPT_FILE
Diffstat (limited to 'support-files')
-rw-r--r-- | support-files/rpm/plugin-postin.sh | 2 | ||||
-rw-r--r-- | support-files/rpm/server-posttrans.sh | 11 | ||||
-rw-r--r-- | support-files/rpm/server-postun.sh | 8 |
3 files changed, 15 insertions, 6 deletions
diff --git a/support-files/rpm/plugin-postin.sh b/support-files/rpm/plugin-postin.sh new file mode 100644 index 00000000000..6be31a35f8e --- /dev/null +++ b/support-files/rpm/plugin-postin.sh @@ -0,0 +1,2 @@ +# request the server restart +echo > %{restart_flag} diff --git a/support-files/rpm/server-posttrans.sh b/support-files/rpm/server-posttrans.sh new file mode 100644 index 00000000000..0d242596185 --- /dev/null +++ b/support-files/rpm/server-posttrans.sh @@ -0,0 +1,11 @@ +if [ -r %{restart_flag} ] ; then + rm %{restart_flag} + if [ -x /usr/bin/systemctl ] ; then + /usr/bin/systemctl daemon-reload > /dev/null 2>&1 + fi + + # only restart the server if it was alredy running + if %{_sysconfdir}/init.d/mysql status > /dev/null 2>&1; then + %{_sysconfdir}/init.d/mysql restart + fi +fi diff --git a/support-files/rpm/server-postun.sh b/support-files/rpm/server-postun.sh index 412c6f4c67b..b1aa0ea4393 100644 --- a/support-files/rpm/server-postun.sh +++ b/support-files/rpm/server-postun.sh @@ -1,10 +1,6 @@ if [ $1 -ge 1 ]; then - if [ -x %{_sysconfdir}/init.d/mysql ] ; then - # only restart the server if it was alredy running - if %{_sysconfdir}/init.d/mysql status > /dev/null 2>&1; then - %{_sysconfdir}/init.d/mysql restart - fi - fi + # request the server restart + echo > %{restart_flag} fi if [ $1 = 0 ] ; then |