Symlink /etc/my.cnf instead of deleting it
All of the existing mariadb elements install from packages. /etc/my.cnf is a packaged file, and it shouldn't be deleted as rpm does not provide a way to "mark" a file as intentionally deleted. Instead of deleting it, create a symlink to the config we actually use at /etc/mysql/my.cnf. Change-Id: I3909cd8fbd77a9121f4e3ba4d40eae799207bff9
This commit is contained in:
parent
4311b1c147
commit
b3b83f5299
@ -16,8 +16,12 @@ fi
|
|||||||
if [ -e /etc/init/mysql.conf ]; then
|
if [ -e /etc/init/mysql.conf ]; then
|
||||||
sed -i -e 's,/var/lib/mysql/,/mnt/state/var/lib/mysql/,g' /etc/init/mysql.conf
|
sed -i -e 's,/var/lib/mysql/,/mnt/state/var/lib/mysql/,g' /etc/init/mysql.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Fedora/RHEL install /etc/my.cnf but we do not want any unmanaged configs
|
# Fedora/RHEL install /etc/my.cnf but we do not want any unmanaged configs
|
||||||
rm -f /etc/my.cnf
|
# mariadb elements install using packages, so we don't want to just delete this
|
||||||
|
# file, so symlink it to the config we actually use.
|
||||||
|
ln -f -s /etc/mysql/my.cnf /etc/my.cnf
|
||||||
|
|
||||||
# On openSUSE /var/lib/mysql is not part of the mariadb packages.
|
# On openSUSE /var/lib/mysql is not part of the mariadb packages.
|
||||||
[ -d /var/lib/mysql ] || install -d -o mysql -g root -m 0700 /var/lib/mysql
|
[ -d /var/lib/mysql ] || install -d -o mysql -g root -m 0700 /var/lib/mysql
|
||||||
register-state-path /var/lib/mysql
|
register-state-path /var/lib/mysql
|
||||||
|
Loading…
Reference in New Issue
Block a user