Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
108265bd
Commit
108265bd
authored
May 25, 2012
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-295 Do NOT start mysql when installing MariaDB rpms
but restart it on upgrade, if it was already running
parent
be0d1179
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
23 deletions
+15
-23
support-files/rpm/server-postin.sh
support-files/rpm/server-postin.sh
+4
-12
support-files/rpm/server-postun.sh
support-files/rpm/server-postun.sh
+7
-0
support-files/rpm/server-prein.sh
support-files/rpm/server-prein.sh
+0
-7
support-files/rpm/server-preun.sh
support-files/rpm/server-preun.sh
+4
-4
No files found.
support-files/rpm/server-postin.sh
View file @
108265bd
...
@@ -4,8 +4,10 @@ mysql_datadir=%{mysqldatadir}
...
@@ -4,8 +4,10 @@ mysql_datadir=%{mysqldatadir}
mkdir
-p
$mysql_datadir
/
{
mysql,test
}
mkdir
-p
$mysql_datadir
/
{
mysql,test
}
# Make MySQL start/shutdown automatically when the machine does it.
# Make MySQL start/shutdown automatically when the machine does it.
if
[
-x
/sbin/chkconfig
]
;
then
if
[
$1
=
1
]
;
then
/sbin/chkconfig
--add
mysql
if
[
-x
/sbin/chkconfig
]
;
then
/sbin/chkconfig
--add
mysql
fi
fi
fi
# Create a MySQL user and group. Do not report any problems if it already
# Create a MySQL user and group. Do not report any problems if it already
...
@@ -65,13 +67,3 @@ if [ -x sbin/restorecon ] ; then
...
@@ -65,13 +67,3 @@ if [ -x sbin/restorecon ] ; then
sbin/restorecon
-R
var/lib/mysql
sbin/restorecon
-R
var/lib/mysql
fi
fi
# Restart in the same way that mysqld will be started normally.
if
[
-x
%
{
_sysconfdir
}
/init.d/mysql
]
;
then
%
{
_sysconfdir
}
/init.d/mysql start
echo
"Giving mysqld 2 seconds to start"
sleep
2
fi
# Allow safe_mysqld to start mysqld and print a message before we exit
sleep
2
support-files/rpm/server-postun.sh
0 → 100644
View file @
108265bd
if
[
$1
-ge
1
]
;
then
if
[
-x
%
{
_sysconfdir
}
/init.d/mysql
]
;
then
# only restart the server if it was alredy running
%
{
_sysconfdir
}
/init.d/mysql status
>
/dev/null 2>&1
&&
\
%
{
_sysconfdir
}
/init.d/mysql restart
fi
fi
support-files/rpm/server-prein.sh
View file @
108265bd
...
@@ -64,10 +64,3 @@ HERE
...
@@ -64,10 +64,3 @@ HERE
fi
fi
fi
fi
# Shut down a previously installed server first
if
[
-x
%
{
_sysconfdir
}
/init.d/mysql
]
;
then
%
{
_sysconfdir
}
/init.d/mysql stop
>
/dev/null 2>&1
echo
"Giving mysqld 5 seconds to exit nicely"
sleep
5
fi
support-files/rpm/server-preun.sh
View file @
108265bd
...
@@ -2,10 +2,10 @@ if [ $1 = 0 ] ; then
...
@@ -2,10 +2,10 @@ if [ $1 = 0 ] ; then
# Stop MySQL before uninstalling it
# Stop MySQL before uninstalling it
if
[
-x
%
{
_sysconfdir
}
/init.d/mysql
]
;
then
if
[
-x
%
{
_sysconfdir
}
/init.d/mysql
]
;
then
%
{
_sysconfdir
}
/init.d/mysql stop
>
/dev/null
%
{
_sysconfdir
}
/init.d/mysql stop
>
/dev/null
# Don't start it automatically anymore
fi
if
[
-x
/sbin/chkconfig
]
;
then
# Don't start it automatically anymore
/sbin/chkconfig
--del
mysql
if
[
-x
/sbin/chkconfig
]
;
then
fi
/sbin/chkconfig
--del
mysql
fi
fi
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment