aboutsummaryrefslogtreecommitdiffstats
path: root/main/mariadb
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-03-21 19:27:15 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2016-03-21 20:44:16 +0100
commit13d027613dc9bc51202eb338821c558580c031a4 (patch)
tree046f84c7b5b049d046e348825440d55b0f59cc6b /main/mariadb
parent2568cbd5a3b32ba035507440ec636eb83cb25239 (diff)
downloadaports-13d027613dc9bc51202eb338821c558580c031a4.tar.bz2
aports-13d027613dc9bc51202eb338821c558580c031a4.tar.xz
main/mariadb: fix init.d script
- find the pidfile from *_pre script instead from global scope - move init.d script to the server package instead of -common
Diffstat (limited to 'main/mariadb')
-rw-r--r--main/mariadb/APKBUILD10
-rw-r--r--main/mariadb/mariadb.initd7
2 files changed, 11 insertions, 6 deletions
diff --git a/main/mariadb/APKBUILD b/main/mariadb/APKBUILD
index e884274612..8794a63364 100644
--- a/main/mariadb/APKBUILD
+++ b/main/mariadb/APKBUILD
@@ -125,8 +125,8 @@ common() {
pkgdesc="MariaDB common files for boh server and client"
replaces="mysql-common"
depends=
- mkdir -p "$subpkgdir"/usr/share/mysql
- mv "$pkgdir"/etc "$subpkgdir"/ || return 1
+ mkdir -p "$subpkgdir"/usr/share/mysql "$subpkgdir"/etc
+ mv "$pkgdir"/etc/mysql "$subpkgdir"/etc/ || return 1
local lang="charsets danish english french greek italian korean norwegian-ny
portuguese russian slovak swedish czech dutch estonian german
hungarian japanese norwegian polish romanian serbian spanish
@@ -178,14 +178,14 @@ _compat_client() { _compat mysql-client mariadb-client; }
_compat_bench() { _compat mysql-bench mariadb-client; }
md5sums="a2c0809f27ec112139c2c50f03569b2b mariadb-10.1.12.tar.gz
-2cf887d864e05947f5b831bd7ca06b74 mariadb.initd
+a9d5617bc49ab1994d34012426a282c5 mariadb.initd
b233fb7015a9659f5b825cd8010d2b52 fix-mysql-install-db-path.patch
96b7247f919bf4e1de13a9d0ce7ef515 fix-ucontext-check.patch"
sha256sums="795f466ac0e4df148981b85df735855d41614abaedcda51520a513a4ad60f4e7 mariadb-10.1.12.tar.gz
-49bab0ec69432d5c56c53ff83488bfa5eb2859bc95a12e8fc7f12d1f0403f0c6 mariadb.initd
+b379b90f38dffc5c9bc56576cee5c485c63cfcda2cf007fa03e6aae070d4f3c8 mariadb.initd
0f4d97cc9d512fc43cdb4b2f2a6dc16b37cb72a18c7d7a3e23e11a116d119904 fix-mysql-install-db-path.patch
3d9a12bf04fcf215567b6a395fe83fb6528602baf4283d42181bd73f93b5f538 fix-ucontext-check.patch"
sha512sums="c0f28de80e22b7fc1f74946f309c364601036aefeea2bb464b11e3658e102dd80ef0d6d156d0af67af76e54741e60334be8c48630766141b01b885d53068b659 mariadb-10.1.12.tar.gz
-53d28d688fc9b45684f8368971c01424e5388d39dfaad8b2c432c54d5fabadf2388786303e92c5ca734cb95b4618863c23f7be2a618efc97854536c3a9dc1240 mariadb.initd
+6478b546f60a7f4c33e3e0edc82555b3b08050ad763a14bde17c8967c1511763ce6edeaf42ac8dedbc0ed344b55df8301b8dea91c08029d592a69fc693d990ce mariadb.initd
f85e96490de56aa4e6115f931bf256bef4e1b93cadbe4ac947d6abdc03072bf2d0872e0268ae37cd98edf13538ece73e9f8b6efa8133bab23168a825c5066ab1 fix-mysql-install-db-path.patch
82fa93411483f5d1b57d978087a891bcab6a011e45c2d79b08d28718f5717994b423fc81d2170dad2fe65303153ac29655a81ce5039e73e37cebb159392a86cf fix-ucontext-check.patch"
diff --git a/main/mariadb/mariadb.initd b/main/mariadb/mariadb.initd
index cb2a388b96..a652ffaf3f 100644
--- a/main/mariadb/mariadb.initd
+++ b/main/mariadb/mariadb.initd
@@ -6,7 +6,6 @@ getconf() {
}
retry="60"
-pidfile=$(getconf pid-file "/run/mysqld/mysqld.pid")
extra_stopped_commands="setup"
command="/usr/bin/mysqld_safe"
command_args="--pid-file=$pidfile --syslog --nowatch"
@@ -23,6 +22,7 @@ setup() {
}
start_pre() {
+ pidfile=$(getconf pid-file "/run/mysqld/mysqld.pid")
required_dirs=$(getconf datadir "/var/lib/mysql")
if [ ! -d $required_dirs/mysql ]; then
eerror "Datadir '$required_dirs' is empty or invalid."
@@ -33,3 +33,8 @@ start_pre() {
start_post() {
ewaitfile 10 $(getconf socket "/run/mysqld/mysqld.sock")
}
+
+stop_pre() {
+ pidfile=$(getconf pid-file "/run/mysqld/mysqld.pid")
+}
+