summaryrefslogtreecommitdiff
path: root/support-files/rpm
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2015-01-26 22:54:27 -0500
committerNirbhay Choubey <nirbhay@mariadb.com>2015-01-26 22:54:27 -0500
commit7cda4bee0ef7c8a3ec85e94bc1443ceaba3a64e8 (patch)
treef8c1f556f36f026038015e7215ae88b0cb7b1ce5 /support-files/rpm
parentea229eb6bb29ee7b11a7d28a7d4c80a593cb1d3b (diff)
parentfb71449b10100e9a0f887b1585000fbfab294f3c (diff)
downloadmariadb-git-7cda4bee0ef7c8a3ec85e94bc1443ceaba3a64e8.tar.gz
maria-10.0.16 merge
bzr merge -r4588 maria/10.0
Diffstat (limited to 'support-files/rpm')
-rw-r--r--support-files/rpm/server-postin.sh53
-rw-r--r--support-files/rpm/server-postun.sh7
2 files changed, 36 insertions, 24 deletions
diff --git a/support-files/rpm/server-postin.sh b/support-files/rpm/server-postin.sh
index 91885f73466..cd2aec4d84a 100644
--- a/support-files/rpm/server-postin.sh
+++ b/support-files/rpm/server-postin.sh
@@ -1,6 +1,10 @@
# Make MySQL start/shutdown automatically when the machine does it.
if [ $1 = 1 ] ; then
+ if [ -x /usr/bin/systemctl ] ; then
+ /usr/bin/systemctl daemon-reload >/dev/null 2>&1
+ fi
+
if [ -x /sbin/chkconfig ] ; then
/sbin/chkconfig --add mysql
fi
@@ -51,30 +55,31 @@ fi
SETARGETDIR=/etc/selinux/targeted/src/policy
SEDOMPROG=$SETARGETDIR/domains/program
SECONPROG=$SETARGETDIR/file_contexts/program
-if [ -f /etc/redhat-release ] \
- && grep -q "Red Hat Enterprise Linux .. release 4" /etc/redhat-release \
- || grep -q "CentOS release 4" /etc/redhat-release ; then
- echo
- echo
- echo 'Notes regarding SELinux on this platform:'
- echo '========================================='
- echo
- echo 'The default policy might cause server startup to fail because it is '
- echo 'not allowed to access critical files. In this case, please update '
- echo 'your installation. '
- echo
- echo 'The default policy might also cause inavailability of SSL related '
- echo 'features because the server is not allowed to access /dev/random '
- echo 'and /dev/urandom. If this is a problem, please do the following: '
- echo
- echo ' 1) install selinux-policy-targeted-sources from your OS vendor'
- echo ' 2) add the following two lines to '$SEDOMPROG/mysqld.te':'
- echo ' allow mysqld_t random_device_t:chr_file read;'
- echo ' allow mysqld_t urandom_device_t:chr_file read;'
- echo ' 3) cd to '$SETARGETDIR' and issue the following command:'
- echo ' make load'
- echo
- echo
+if [ -f /etc/redhat-release ] ; then
+ if grep '\(Red Hat Enterprise Linux ..\|CentOS\) release 4' \
+ /etc/redhat-release >/dev/null 2>&1; then
+ echo
+ echo
+ echo 'Notes regarding SELinux on this platform:'
+ echo '========================================='
+ echo
+ echo 'The default policy might cause server startup to fail because it is '
+ echo 'not allowed to access critical files. In this case, please update '
+ echo 'your installation. '
+ echo
+ echo 'The default policy might also cause inavailability of SSL related '
+ echo 'features because the server is not allowed to access /dev/random '
+ echo 'and /dev/urandom. If this is a problem, please do the following: '
+ echo
+ echo ' 1) install selinux-policy-targeted-sources from your OS vendor'
+ echo ' 2) add the following two lines to '$SEDOMPROG/mysqld.te':'
+ echo ' allow mysqld_t random_device_t:chr_file read;'
+ echo ' allow mysqld_t urandom_device_t:chr_file read;'
+ echo ' 3) cd to '$SETARGETDIR' and issue the following command:'
+ echo ' make load'
+ echo
+ echo
+ fi
fi
if [ -x sbin/restorecon ] ; then
diff --git a/support-files/rpm/server-postun.sh b/support-files/rpm/server-postun.sh
index dcf67173a02..412c6f4c67b 100644
--- a/support-files/rpm/server-postun.sh
+++ b/support-files/rpm/server-postun.sh
@@ -6,3 +6,10 @@ if [ $1 -ge 1 ]; then
fi
fi
fi
+
+if [ $1 = 0 ] ; then
+ if [ -x /usr/bin/systemctl ] ; then
+ /usr/bin/systemctl daemon-reload > /dev/null 2>&1
+ fi
+fi
+