diff options
author | Brian Evans <grknight@gentoo.org> | 2014-08-21 03:08:22 +0000 |
---|---|---|
committer | Brian Evans <grknight@gentoo.org> | 2014-08-21 03:08:22 +0000 |
commit | bf73a6c9feea4dce95782ee12e48a03c515a3d41 (patch) | |
tree | a2faa384fcfcc864e7046d3541b375baa40d8c13 /dev-db/mysql-init-scripts | |
parent | Version bump. (diff) | |
download | historical-bf73a6c9feea4dce95782ee12e48a03c515a3d41.tar.gz historical-bf73a6c9feea4dce95782ee12e48a03c515a3d41.tar.bz2 historical-bf73a6c9feea4dce95782ee12e48a03c515a3d41.zip |
Verision bump to 2.0 adding a simple checkconfig and support for chroot
Package-Manager: portage-2.2.8-r1/cvs/Linux x86_64
Manifest-Sign-Key: 0x67C78E1D
Diffstat (limited to 'dev-db/mysql-init-scripts')
-rw-r--r-- | dev-db/mysql-init-scripts/ChangeLog | 11 | ||||
-rw-r--r-- | dev-db/mysql-init-scripts/Manifest | 22 | ||||
-rw-r--r-- | dev-db/mysql-init-scripts/files/conf.d-2.0 | 79 | ||||
-rw-r--r-- | dev-db/mysql-init-scripts/files/init.d-2.0 (renamed from dev-db/mysql-init-scripts/files/mysql-5.1.67-init.d-r1) | 30 | ||||
-rw-r--r-- | dev-db/mysql-init-scripts/files/mysql.conf.d | 80 | ||||
-rw-r--r-- | dev-db/mysql-init-scripts/files/mysql.rc6 | 358 | ||||
-rw-r--r-- | dev-db/mysql-init-scripts/files/mysqlmanager.conf.d | 28 | ||||
-rw-r--r-- | dev-db/mysql-init-scripts/files/mysqlmanager.rc6 | 230 | ||||
-rw-r--r-- | dev-db/mysql-init-scripts/mysql-init-scripts-1.2.ebuild | 26 | ||||
-rw-r--r-- | dev-db/mysql-init-scripts/mysql-init-scripts-2.0.ebuild (renamed from dev-db/mysql-init-scripts/mysql-init-scripts-2.0_pre1-r7.ebuild) | 6 |
10 files changed, 132 insertions, 738 deletions
diff --git a/dev-db/mysql-init-scripts/ChangeLog b/dev-db/mysql-init-scripts/ChangeLog index 4edb5dfeba66..ca4b4d2a1026 100644 --- a/dev-db/mysql-init-scripts/ChangeLog +++ b/dev-db/mysql-init-scripts/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for dev-db/mysql-init-scripts # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-init-scripts/ChangeLog,v 1.40 2014/08/10 20:01:21 slyfox Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-init-scripts/ChangeLog,v 1.41 2014/08/21 03:08:13 grknight Exp $ + +*mysql-init-scripts-2.0 (21 Aug 2014) + + 21 Aug 2014; Brian Evans <grknight@gentoo.org> +files/conf.d-2.0, + +files/init.d-2.0, +mysql-init-scripts-2.0.ebuild, + -files/mysql-5.1.67-init.d-r1, -files/mysql.conf.d, -files/mysql.rc6, + -files/mysqlmanager.conf.d, -files/mysqlmanager.rc6, + -mysql-init-scripts-1.2.ebuild, -mysql-init-scripts-2.0_pre1-r7.ebuild: + Verision bump to 2.0 adding a simple checkconfig and support for chroot 10 Aug 2014; Sergei Trofimovich <slyfox@gentoo.org> mysql-init-scripts-1.2.ebuild, mysql-init-scripts-2.0_pre1-r6.ebuild, diff --git a/dev-db/mysql-init-scripts/Manifest b/dev-db/mysql-init-scripts/Manifest index 9226f434732c..e1872117e2ff 100644 --- a/dev-db/mysql-init-scripts/Manifest +++ b/dev-db/mysql-init-scripts/Manifest @@ -1,27 +1,27 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 +AUX conf.d-2.0 3063 SHA256 6cd8551b8ac0dded54f42c2cc9cd55fbc4776d1a541e13d7d571cefd906cb3f4 SHA512 10144086db0fdcb8309e091bc43911fa9861d099500f2d8532376707d947da08491f7629e4008468758464cd2b3911479701fa24fff9f1614008a5c227529e3a WHIRLPOOL 0317929f28e0767e9bcb60715dc3bb2a05f5d1a0e05133135294abc8870f40ed3a4a26507b2ea84d4f7bc6e25f371d1cc7f1acc69ad08a8a9e940bb289d6b1c3 +AUX init.d-2.0 4263 SHA256 c615a9f3b684e15fa5a41f22ae0e6f4ee48658e60a9166df2b4037298fb256b3 SHA512 134bb151d76a7bcc43d2f65f897cfdcca4652abb5dbc508df77822500c0ee0c37e2f27a32ef4776140e02e6851b274eca363c27ad58d6ff8ee829b6429a1209f WHIRLPOOL 9afda3d9965978213bf7467708dfec15a469acf1ae70448f2bf4f3c192e494a1ecddb3e9463c4db4280980da8352b63ad58a3cf58985478659b69f48175d42a7 AUX logrotate.mysql 491 SHA256 a82f4497594e03cce55dce1f008206bafb85e3e4c6fc1f43c7a90d57be5f7aa1 SHA512 d5d3a753938c6c790a8202cd4685cc6a539e10519032fd26693130b51ef6a35a3a2e58b1c8be302ec7b73ef27aa8b99f992f16385fc2d28e05cc02611a2803ec WHIRLPOOL d7d55fa1a0afd1d98553809e30c99685db3ce20b26326ac19115f81c105db0b688c990494a4444f280517c2f56c05da4eddaa931b647fbed61d9db4908f878b7 AUX mysql-5.1.53-conf.d 3071 SHA256 45da613841969adf564f9f2f08257f749539651ee2fae85266f59fdd7a6f8123 SHA512 d8b861bea36e6701f6959edcac893a5e553eb9eeac70719789635d989a5b9bd90c85643ccc51b86df01879a730c0da3815169d3b16984f3342e10e2f5096a67a WHIRLPOOL d1c06e8eb7d3ae239b9ffae1a273bee318db1429ab4ea55eba7e6db94f826e711cefaf9f67a53778e55dff94a49719644eeb813237e0e94b4ef926d38b0c39eb AUX mysql-5.1.67-init.d 3289 SHA256 a08df7aa811607f45a40ee1a4aa56eff569568f9bc69f2f76192cc15e55f21b0 SHA512 cab8d33bd07c6981e70e67ae3b5ee4bf681c9fa453432a9994df1064ec492a6ef8be41b67472f4b893002b481ecfb13be7d4ffeefc3d92f81f5a12dea6edbd1b WHIRLPOOL aaf95c17c41fedd43f54e143f8e39e17735a4b631532b3cbbd81180a84a0e2c209582c31d875b5f0f3d3050c55fbd7afefdcf452da53d1b91c41a1240db90257 -AUX mysql-5.1.67-init.d-r1 3601 SHA256 6c60bf7746a63f0daac26e4de132e675d6aac9f04e2b4bc758776ab67f61146a SHA512 2b29fc00ce7d1ae5170a25f1c48c2cf472a5a88f5612e799088242b21921192fe61b21afcb657cf7a7d217b281318e3e7a681326be207b1271ec0ae2a10ea663 WHIRLPOOL 39c27966e85d9722caa35def115ae200095fe577f76dd37659312cbb5bb05b071bd799622b0f588476c59a058727b78358b4d21687e96554adfd18752d3772a5 AUX mysql.conf 37 SHA256 08daa863ddd50aff0b608621ed26936919211e286440951dca5866141291004d SHA512 7b4940666d21f09fda47e2b24bd252c83af4372f34f1b3410c59d8f439fb7c0166d5a1b8d857bf67f2263f15d95a0fa0b67f225152a18c180b67d28f4ceb5f00 WHIRLPOOL e2765bf32478fa6d3362760845188bc25b5e2a280cac66dc453b593445d8eaa0af4c92704ed20b4561377771b354605477d8cb5420937d1e9f970e0b4b106d85 -AUX mysql.conf.d 3273 SHA256 ee049781a3885305ce9999371198ff54f97fee4d2ad0814ba3aa3a03abc2724c SHA512 b2d83b2b5a3966d580bc19b6da9dd8f124a2dde29f34258699b759cc7bf863411a44f4f3930d7102458e5020ca4bfb91b99bfa7c4de5318e6cad9e9663e84dae WHIRLPOOL 61d305da26bca89ec92a1ee0bd51e968844df324e9794ffce284e125979af25a7455a52d8ca3a96946ace02db07d00936cc3f3a5520aec957a20e9928be9d8d8 -AUX mysql.rc6 10661 SHA256 039e54883fc42d3b9ddfdfca46bb906420a7d47156f5b1392292f4aa3f712149 SHA512 6a6349c5f3877a4ba81e2979f1eaad561cfea43029c46a2398624ffeca0c190aa7814813569605edca8ce70286b4af7854db27412975e446c357e09ce2cc6a66 WHIRLPOOL 5e80c8b36a97274ec1964218f27f15194269e1073fd9979ffb7b7512e54b8a1884970189f9f391b4871140ac5e84a4e89c7e78a3635ee2f8df78320b62a2aa9e AUX mysqld-wait-ready 1758 SHA256 98d845897c4098e4a3ca62cd3bad26a6fc2565a33737f1d1c91f9c98006c7157 SHA512 ad4a850d045149df156c8236ae114e94887626e3ca803dea9bcc3909349043b51357a71ac17d694e0217f7856e076a0736267fc1ea3dedbef8a319fc9014c01b WHIRLPOOL fb748c13658d276c061a44ffd488eeb2cf002df20ee94b5aa600175fa776e099211f89343d1322bbf03ddaebbafb30208e615ad78eb1fbedb26f77232662907b AUX mysqld.service 638 SHA256 75cde49c980757250d4e801c3f506f4540ae2afc59d5cd0cffc4f70e2c7e2de0 SHA512 631d0cafd6ee4703803143c402898b52d2508cd016b81f847503a09364cd3d4929f48d020a65ecf8d61200e7f7cd0ea11011380358bcf65e1125d40e5600d849 WHIRLPOOL 592e8ee78710e938a2ae85550b6bd4ab0c7ddde007ff386862c8450452d1f8d16206635948fd52d225ee8fdece519afad81f6944b23d09de969f25bf0174964f AUX mysqld_at.service 694 SHA256 5ba955058dfd26c3ed8a3b7d979ebd3e5cf0e1423cd1e730e400137059d10906 SHA512 f33864294ba2adea940027da32a9b744dd665e2d0325b0ff2a9d2ff7a1b7fbc2885e80ca548d4784c45665826b5fa7c0c73400352db5ac108260ef2e021d6752 WHIRLPOOL 1f703df092bdf03e2ebbab8db0aa618b7482b7116a21e31a6b41e84c3c35887b3ba6bf8c56fc8c74bfb0fabbb603f322502a6e34e745a2038cb1d188abf7d105 -AUX mysqlmanager.conf.d 1009 SHA256 35353f585cc9d3f97bbcfe77224d183e0fedcf4134377b8bff4c278462577cc7 SHA512 8900849a20ad8fc61e480bdc668397a108950cae69a138811d0fd0b82aca071b77e3af863df20e9c7d478c9842bb5e8407fc8313a31154cfa866f122c10a2d31 WHIRLPOOL 90abd9d197e0dc90110a6056a9c21720fe2ec80356400c8ed4c43bb477317e4de7796479663d87a0b5bb1c9522a8233ae3b9c1ad72cdd850f5fada36237712d1 -AUX mysqlmanager.rc6 6632 SHA256 0d37cb3199a2752604a105d54340a61b9ee062e6c1d977a863628b694d93e96d SHA512 edaebc6a75157ced72556a64acb81e0761c0005fb4b6ca43778939577303e76cc7117ad3847eabaa28ed670e50f84366ae9773d3f7c88320f7690581f009f415 WHIRLPOOL b9840e0e2f0e8b1205dfbf066e6f89cd1cc053cbb8396bbfef955843a49e8ab36f08b6f5dc254eeebe5f5c5fa0a882a67d64aa9927f49716d201026229b4e4f0 -EBUILD mysql-init-scripts-1.2.ebuild 767 SHA256 5888937e9a03257db548b1ad861fa0dd3103386222f78645cae74d09526bc4fc SHA512 5c43fb8ba1b724090b060c8c50e76f2fe31432bf74472126655f1f0ff3ee3bbbf734c74555e6cd72a19102c4b5ba62ed60e3699453c1d12bd5ca523f3ec52bae WHIRLPOOL 7866e656aa1772894d9b70de239127560f1c667711c25b32351d06b23405f1acddbd1029d1882649a5e5e46102a98f145c8f96b60827d8212ffc364e8be25f4b +EBUILD mysql-init-scripts-2.0.ebuild 2285 SHA256 faad2aeb6828cfb8c54a66e7eb064701016959aadcad762d0ab4f8da0431823e SHA512 acce9d859fff750427c251db5203f69974a42d63565fb00236f9b6220042a867655bc832b4e47771c5f1edfe54c2d6c914be7eedae5915df5e154bee91bf98a5 WHIRLPOOL 10dd37f31e0ab4de0c98e1c68ad04fa29b1c73e1a63cda7cef63262346de07895a8a07f9503ba5f7d2deebc2e7ae8317adc22faa6f120f7669f991275d07ef4b EBUILD mysql-init-scripts-2.0_pre1-r6.ebuild 2206 SHA256 6d03f74b1a740d34b302dc33c76ec8719b8a27d9f96bab4f16f679f9199e61b3 SHA512 8b311a4a71e94889a4005732e56a00d9918a2942762d80ec2821c6fcd640f138252614215ccebdb3a0ba72ed207d11ca69bb21c1e8be5c1e73ec2aa6f4137a7f WHIRLPOOL adedb3b71fa2102e257959b0d4a3824ea52ebc775e74d60a3a9eb16f02511b2625bcc1d6ed99cdb20d22d6424228c6db65ce192660a6bc5ddbe7820fb9db51a9 -EBUILD mysql-init-scripts-2.0_pre1-r7.ebuild 2308 SHA256 b9a28fbf56812b33746e2bdbc4f9498f7cc0f23197b25a700d03d02c0e269521 SHA512 f45bdb76e4eb41b84073356876a10198176b8c0f18188adf9a00d8d853f575970eb5edc461508c1e478451ecd1effa80bd253e843934d8c88edd61bd9144fd9e WHIRLPOOL 19e1a1cc8c0b099307a16a1b28da5ae26d79bef501659ceba3e9ff2f4b4ef4828b2409b5030e9802aae6617c2e1c589aaaff67d2d4f49ff9608581f227fecb85 -MISC ChangeLog 6941 SHA256 3809caffb0c5b5f26f798bad019af47b6a81e29f18bfc52549d0e7ae6a84e178 SHA512 c6cd92ac833929cdbb77b145ce225d74e950e1b4fd37eced27541cbdb6385580693b8be807db687287bf7dac0c275875504e67e3086207c3d4faa6c3403a24bd WHIRLPOOL f3cc0fd3c36d8940009b58174adb69748cb92844b52b0dc72dc66bf3054069d30d8ddca2a0d46fe766aa6c9bd0e16d2610d4331963a385bcb2a9fb13219dffe5 +MISC ChangeLog 7379 SHA256 73f0865ee5b7ff2cc8b5c1aa4fd67e275b1348c6099790ce0c368799041131a4 SHA512 77b6a86ee7ac2da59d2abc28abcc6b55f39150660e876727319cbe6c214b90a385206da0fb37f2c25d85f74694430f04314356a53f3ef774886cd63d368ba709 WHIRLPOOL f881cd920da9bb16ffaa31ded9001e1f6e91c7498cb84b337c0efe6701511cc81f69775684cc4180a798e33221c01803c82170483998840ec66bcf4ddda66146 MISC metadata.xml 159 SHA256 5cfd5aa0e8104c0326b5f4c9205a6449a94e0f6f6abfd2626f1e7a8fe77b98b7 SHA512 f06513333c3d0b329da5d8ea142c0dbd58d9c40c559d92ae4b0ac7e5fae848f56a832867c79f6931148de7d97302b690ce676f911d477e85ebab7798ce198d92 WHIRLPOOL b99390a39596639a5903a470d8a00dcfdc001c2cd70631526b1586b9a32893c00692fcb19cb2764979f128318dd01782be4d3a84ad82ee202da77d908d56c0b5 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 -iEYEAREIAAYFAlPnz5EACgkQcaHudmEf86ojPwCfTs7rqhFO33OVDXUt61VK9a1X -KiwAn02siRFM7R0ZVrqjO3xNgOPz0lsa -=0vCq +iQEcBAEBCAAGBQJT9WKiAAoJEE4V4vFnx44diaYH/RO2hJ5RKmtuw/2Mf5lLj68S +0HJkESYYjre4k5OM72jrjITUAACvlnik/yrSqHgX0J57Xzo2GqlA1e6W3eGQlh31 +nZiSXqEB2dUETN+UNLQBZ4kyRzLMxPm0KvkPvOrI3zGKONjaKyxYZrKOEL6+pqFH +wTH4AaKIjG5GXfDinQIxcIfTKwvK3/nKMxgz5ATR3HWSSMfZ5pjqI8WHUKIFQjP9 +Kkl117zuqCYI56ccUVxxKiwSt9MxFCdAgwr9ndU6wc796weEMy7ieoFt5ab0GrQ6 +8ykX/5+Ie+U/9g4r1nQPuAIkhM9msa2x1t/x/nGT9E3YO99OsGq7GgFgrJaG4qo= +=r98/ -----END PGP SIGNATURE----- diff --git a/dev-db/mysql-init-scripts/files/conf.d-2.0 b/dev-db/mysql-init-scripts/files/conf.d-2.0 new file mode 100644 index 000000000000..953575b24766 --- /dev/null +++ b/dev-db/mysql-init-scripts/files/conf.d-2.0 @@ -0,0 +1,79 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-init-scripts/files/conf.d-2.0,v 1.1 2014/08/21 03:08:13 grknight Exp $ + +# If you want a non-stock location for the config file, uncomment or update +# either of these as needed. If you do use it, you must make sure that none of +# your socket, pidfile, datadir, logfiles, binary logs, relay logs or InnoDB +# files collide with each other. +MY_CNF="/etc/mysql/my.cnf" +#MY_CNF="${MY_CNF:-/etc/${SVCNAME}/my.cnf}" +#MY_CNF="${MY_CNF:-/etc/mysql/my-${SVCNAME/mysql.}.cnf}" + +# Place any additional arguments here that you might need +# Common/useful options: +# --skip-slave-start=1 - For bringing up replication initially +# --server-id=NNN - Server ID for replication +# --skip-networking - lock it down to UNIX sockets only +MY_ARGS="" + +# This setting (in seconds) should be high enough to allow InnoDB to do a full +# checkpoint recovery. 900 is the default used in the upstream RPM startup +# scripts. 30 seconds should be sufficent if you just have a tiny <1GiB +# database. After the core startup is done, we wait this long for the UNIX +# socket to appear. +STARTUP_TIMEOUT="900" + +# This is how long, in milliseconds, we wait for pidfile to be created, early +# in the startup. +STARTUP_EARLY_TIMEOUT="1000" + +# How long (in seconds) should we wait for shutdown? +STOP_TIMEOUT=120 + +# integer [-20 .. 19 ] default 0 +# change the priority of the server -20 (high) to 19 (low) +# see nice(1) for description +#NICE=0 + +# See start-stop-daemon(8) for possible settings +#IONICE=2 + +# If defined, --verbose gets passed to S-S-D +#DEBUG=1 + +# Depending on your usage of MySQL, you may also wish to start it after some +# other services are up. Uncomment the lines below as needed. If these aren't +# enough for you, we encourage you to file a bug, and help us understand how +# you are using MySQL. + +# Do your MySQL ACLs refer to hostnames not in your /etc/hosts? +# If so, you need DNS before you can accept connections. +# Avoid dependency circular loops if you use MySQL to power a local DNS server. +#rc_use="dns" +#rc_after="dns" + +# Does your MySQL bind to an IP on an interface other than net.lo? +# Alternatively you might wish to specify the exact interface here. +#rc_use="net" +#rc_after="net" + +# Do you store your MySQL files on a SAN or other network filesystem, that is +# provided by the netmount init script? +#rc_need="netmount" + +# Or from NFS? P.S. This is not a good idea in most cases, but does have some +# valid usage cases, so we provide the option. +#rc_need="nfsmount" + +# Should any one of the instances satisfy the requirement for MySQL coming up? +# By default, we say no. +[ "${SVCNAME}" != mysql ] && rc_provide="!mysql" +# But uncomment this next instead if you think it should. +#rc_provide="mysql" + +# The conditional above has a false-positive "failure" return value as a +# side-effect, and since it's the last statement, without the next line, this +# script returns failure. +return 0 +# vim: ft=gentoo-conf-d et ts=4 sw=4: diff --git a/dev-db/mysql-init-scripts/files/mysql-5.1.67-init.d-r1 b/dev-db/mysql-init-scripts/files/init.d-2.0 index 5ff7c32aa108..c7e5eaf619d1 100644 --- a/dev-db/mysql-init-scripts/files/mysql-5.1.67-init.d-r1 +++ b/dev-db/mysql-init-scripts/files/init.d-2.0 @@ -1,7 +1,9 @@ #!/sbin/runscript # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-init-scripts/files/mysql-5.1.67-init.d-r1,v 1.1 2014/05/16 01:49:43 grknight Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-init-scripts/files/init.d-2.0,v 1.1 2014/08/21 03:08:13 grknight Exp $ + +extra_commands="checkconfig" depend() { use net.lo @@ -36,6 +38,9 @@ start() { return 1 fi + # Check the config or die + checkconfig || return 1 + # Now we can startup ebegin "Starting $(mysql_svcname)" @@ -51,6 +56,12 @@ start() { local datadir=$(get_config "${MY_CNF}" datadir | tail -n1) local pidfile=$(get_config "${MY_CNF}" pid-file | tail -n1) local socket=$(get_config "${MY_CNF}" socket | tail -n1) + local chroot=$(get_config "${MY_CNF}" chroot | tail -n1) + + if [ -n "${chroot}" ] ; then + socket="${chroot}/${socket}" + pidfile="${chroot}/${pidfile}" + fi if [ ! -d "${datadir}" ] ; then eerror "MySQL datadir \`${datadir}' is empty or invalid" @@ -121,5 +132,22 @@ stop() { --retry ${stop_timeout} eend $? } + +checkconfig() { + local basedir=$(get_config "${MY_CNF}" basedir | tail -n1) + ebegin "Checking mysqld configuration" + + # Suppress output to check the return value + "${basedir}"/sbin/mysqld --help --verbose &> /dev/null + + # If the above command does not return 0, + # then there is an error to echo to the user + if [ $? -ne 0 ] ; then + "${basedir}"/sbin/mysqld --help --verbose > /dev/null + fi + + eend $? "MySQL config check failed" +} + # vim: filetype=gentoo-init-d sw=2 ts=2 sts=2 noet: diff --git a/dev-db/mysql-init-scripts/files/mysql.conf.d b/dev-db/mysql-init-scripts/files/mysql.conf.d deleted file mode 100644 index 15ff170cc98a..000000000000 --- a/dev-db/mysql-init-scripts/files/mysql.conf.d +++ /dev/null @@ -1,80 +0,0 @@ -# Here is where we define which server(s) to start. -# Additional parameters to be passed to mysqld at startup may be added here, -# which will override the ones in "my.cnf". -# -# Below are described some suggested parameters to use. -# The parameters not recognized will be passed through to the mysqld daemon -# directly! -# To avoid starting a server just comment it's definition. -# -# Last but not least, SPACES are NOT allowed inside the parameters! -# -# Parameter : description -# ----------------+----------------------------------------------------------- -# nice : integer [-20 .. 19 ] default 0 -# : change the priority of the server -20 (high) to 19 (low) -# : see "man nice 1" for description -# ----------------+----------------------------------------------------------- -# mycnf : string [full path to my.cnf] -# : specify the path to my.cnf file to be used -# ----------------+----------------------------------------------------------- -# startup_timeout : integer [seconds] default 15 -# : time to wait for mysqld up and running, after this it's -# : marked as failed -# ----------------+----------------------------------------------------------- -# -# Additional parameters -# Parameter : description -# ----------------+----------------------------------------------------------- -# server-id : integer [1 .. 255] -# : Uniquely identifies the server instance in the community -# : of replication partners. -# ----------------+----------------------------------------------------------- -# port : integer [1025 .. 65535] default 3306 -# : Port number to use for connection. -# : Looses any meaning if skip-networking is set. -# ----------------+----------------------------------------------------------- -# skip-networking : NULL -# : Don't allow connection through TCP/IP. -# ----------------+----------------------------------------------------------- -# log-bin : string [name of the binlog files] -# : Log update queries in binary format. Optional (but -# : strongly recommended to avoid replication problems if -# : server's hostname changes) argument should be the chosen -# : location for the binary log files. -# ----------------+----------------------------------------------------------- -# Additionally the following variables are recognized: -# -# Be more verbose, accepts values from 1 to 4 -#DEBUG=4 -# -# The default location for the "master" pid file -#MYSQL_GLOB_PID_FILE="/var/run/svc-started-mysqld" -# -# The timeout for a failed attempt to stop a server -#STOPTIMEOUT=120 -# - -# The parameters are passed in a bash array variable, -# the variable name is mysql_slot_0_[server-num] -# "server-num" is an optional number used to start multiple servers -# -# Examples: -# -# start a default server with default options: -#mysql_slot_0=() -# -# start MySQL reniced, overriding some start parameters -#mysql_slot_0=( -# "nice=-5" -# "server-id=123" -# "log-bin="myhost" -# "port=3307" -#) -# -# start another server, different my.cnf -#mysql_slot_0_1=( -# "mycnf=/home/test/my.cnf" -# "server-id=124" -#) -# diff --git a/dev-db/mysql-init-scripts/files/mysql.rc6 b/dev-db/mysql-init-scripts/files/mysql.rc6 deleted file mode 100644 index e67c2ca1d13e..000000000000 --- a/dev-db/mysql-init-scripts/files/mysql.rc6 +++ /dev/null @@ -1,358 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-init-scripts/files/mysql.rc6,v 1.2 2007/03/04 15:47:03 vivo Exp $ - -# external binaries used: which, sed, tac - -# int in_list(char * elem, char * list) -function in_list() { - local elem=${1:-"none"} - local list=${2:-","} - - [[ "${list}" == "${list/,${elem},/}" ]] \ - && return 1 \ - || return 0 -} - -function wdebug() { - if [[ "${DEBUG}" -ge "${1}" ]] ; then - shift - echo "dbg: ${@}" - fi -} - -depend() { - use dns net localmount netmount nfsmount -} - -do_escape() { - # Ihatethisreallyverymuch - #echo "$1" | sed -e "s|'| |" -e "s|=|='|" -e "s|$|'|" - echo "$1" -} - -# int get_slot_config(srv_slot=0, srv_num) -get_slot_config() { - wdebug 4 ">>> get_slot_config()" - - local srv srv_slot srv_num - srv_slot="${1:-"0"}" - srv_num="${2}" - MY_SUFFIX="-${srv_slot}" - # srv=array(0 => [srv_slot], 1 => [srv_num] ) - srv=( ${srv_slot} ${srv_num} ) - - local tmp_eval="mysql_slot_${srv_slot}${srv_num:+"_"}${srv_num}[@]" - local conf_d_parameters="${!tmp_eval}" - if [[ "${srv_slot}" == "0" ]] ; then - MY_SUFFIX='' - # try some other default for the default server - [[ -z "${conf_d_parameters[@]}" ]] && conf_d_parameters=${mysql_slot[@]} - fi - [[ -z "${conf_d_parameters[@]}" ]] && conf_d_parameters=( ) - basedir="" datadir="" pidfile="" socket="" - CHROOT="" NICE="" STARTUPTIMEOUT=5 STOPTIMEOUT=120 - - wdebug 3 "srv ${srv[@]}" - wdebug 3 "srv_slot ${srv_slot}" - wdebug 3 "srv_num ${srv_num}" - wdebug 3 "tmp_eval ${tmp_eval}" - wdebug 3 "conf_d_parameters ${conf_d_parameters[@]}" - wdebug 3 "MY_SUFFIX ${MY_SUFFIX}" - - local tmp_eval="mysql_slot_${srv_slot}${srv_num:+"_"}${srv_num}[@]" - local conf_d_parameters="${!tmp_eval}" - # collations need to be defined *after* the character sets, - # so we will duplicate them - local collations="" - [[ ${conf_d_parameters[*]} == '()' ]] && conf_d_parameters='' - - MY_CNF="/etc/mysql${MY_SUFFIX}/my.cnf" - # summa of unmanaged parameters - # some parameters may be present multiple times - unmanagedparams="" - - # grab the parameters from conf.d/mysql definition - for my_default in ${conf_d_parameters[*]} ; do - case "${my_default}" in - nice=*) - NICE="${my_default#nice=}" - nice -n $NICE ls /tmp &>/dev/null || NICE="" - ;; - mycnf=*) MY_CNF="${my_default#mycnf=}" ;; - startup_timeout=*) - STARTUPTIMEOUT="${my_default#startup_timeout=}" ;; - basedir=*) basedir="${my_default#basedir=}" ;; - datadir=*) datadir="${my_default#datadir=}" ;; - pid-file=*) pidfile="${my_default#pid-file=}" ;; - socket=*) socket="${my_default#socket=}" ;; - *collation*=) - collations="${collations} --$( do_escape "${my_default}" )" - ;; - *=*) - # list of parameters we already have - # prepend "--" because my_print_defaults do it - unmanagedparams="${unmanagedparams} --$( do_escape "${my_default}" )" - ;; - *) - unmanagedparams="${unmanagedparams} --${my_default}" - ;; - esac - done - - if [[ ! -r "${MY_CNF}" ]] ; then - ewarn "Cannot access ${MY_CNF} !" - MY_CNF="" - my_defaults="" - else - local my_print_defaults="$(which my_print_defaults${MY_SUFFIX} 2>/dev/null)" - if [[ ! -x "${my_print_defaults}" ]] ; then - eerror "my_print_defaults NOT found or not executable" - my_defaults="" - else - my_defaults=$( ${my_print_defaults} \ - --loose-verbose \ - --config-file="${MY_CNF}" \ - mysqld server ) - fi - fi - - # grab needed parameters from my.cnf, don't override the ones from - # conf.d/mysql - for my_default in ${my_defaults} ; do - case "${my_default}" in - --basedir=*) - [[ -z "${basedir}" ]] && basedir="${my_default#--basedir=}" ;; - --datadir=*) - [[ -z "${datadir}" ]] && datadir="${my_default#--datadir=}" ;; - --pid-file=*) - [[ -z "${pidfile}" ]] && pidfile="${my_default#--pid-file=}" ;; - --socket=*) - [[ -z "${socket}" ]] && socket="${my_default#--socket=}" ;; - --*collation*=) - # the order is inversed because we want the conf.d ones overriden - collations="$( do_escape "${my_default}" ) ${collations}" - ;; - esac - done - - # some parameters - basedir="${basedir:-"/usr"}" - datadir="${datadir:-"/var/lib/mysql${MY_SUFFIX}"}" - pidfile="${pidfile:-"/var/run/mysqld/mysqld${MY_SUFFIX}.pid"}" - socket="${socket:-"/var/run/mysqld/mysqld${MY_SUFFIX}.sock"}" - unmanagedparams="${unmanagedparams} ${collations}" - - wdebug 3 "chroot dir => ${CHROOT}" - wdebug 3 "niceness => ${NICE}" - wdebug 3 "basedir => ${basedir}" - wdebug 3 "datadir => ${datadir}" - wdebug 3 "pidfile => ${pidfile}" - wdebug 3 "socket => ${socket}" - wdebug 3 "Unamanged => ${unmanagedparams}" - - # extension for sleep tenth of seconds, not very portable so check it before - if sleep 0.01 ; then - STARTUPTIMEOUT=$(( STARTUPTIMEOUT * 10 )) - STOPTIMEOUT=$(( STOPTIMEOUT * 10 )) - TIMEUNIT=0.1 - else - TIMEUNIT=1 - fi - - # push these out to the script - export MY_SUFFIX NICE MY_CNF pidfile datadir basedir socket CHROOT - export unmanagedparams STARTUPTIMEOUT STOPTIMEOUT TIMEUNIT - wdebug 4 "<<< get_slot_config() ok" - return 0 -} - -checkconfig() { - wdebug 4 ">>> checkconfig(\"${1}\")" - local datadir="${1}" pidfile="${2}" socket="${3}" - - if [[ -n "${NOCHECK}" ]] ; then - rm -f "${pidfile}" "${socket}" - return 0 - fi - - if [[ ! -d "${datadir}" ]] ; then - eerror "MySQL datadir is empty or invalid" - eerror "Please check your my.cnf : ${MY_CNF}" - wdebug 4 "<<< checkconfig() KO" - return 1 - fi - - if [[ ! -d "${datadir}/mysql" ]] ; then - eerror "You don't appear to have the mysql database installed yet." - eerror "Please run /usr/bin/mysql_install_db to have this done..." - wdebug 4 "<<< checkconfig() KO" - return 1 - fi - - if [[ -f "${pidfile}" ]] ; then - kill -15 $(< ${pidfile}) 2>/dev/null - if [[ $? -eq 0 ]] ; then - # the process exist, we have a problem - eerror "\"${pidfile}\" is still present and the process is running." - eerror "Please stop it \"kill $(< ${pidfile})\" maybe ?" - wdebug 4 "<<< checkconfig() KO" - return 1 - else - rm -f "${pidfile}" - fi - fi - - if [[ -S "${socket}" ]] ; then - ewarn "Strange, the socket file already exist in \"${socket}\"" - ewarn "it will be removed now and re-created by the MySQL server" - ewarn "BUT please make your checks." - rm -f "${socket}" - fi - - wdebug 4 "<<< checkconfig() ok" - return 0 -} - -start() { - wdebug 4 ">>> start()" - - MYSQL_GLOB_PID_FILE=${MYSQL_GLOB_PID_FILE:-"/var/run/svc-started-${SVCNAME/mysql/mysqld}"} - # servers are defined in /etc/conf.d/mysql - local serverlist=${!mysql_slot_*} - # provide default for empty conf.d/mysql - if [[ -z "${serverlist}" ]] ; then - serverlist=0 - export mysql_slot_0=( ) - fi - local retstatus timeout - local globretstatus=1 - local srv_slot srv_num - # server MUST NOT share same location for these - local pidfilelist=',' datadirlist=',' socketlist=',' - local ssd_thing=1 - local mysqld_thing tmpnice - - ebegin "Starting ${myservice}" - # try to start each server - for srv in ${serverlist[*]} ; do - - srv_slot="${srv#mysql_slot_}" - if [[ "${srv_slot}" == "${srv_slot#*_}" ]] ; then - srv_num='' - else - srv_num="${srv_slot#*_}" - fi - srv_slot="${srv_slot%%_*}" - - retstatus=0 - get_slot_config "${srv_slot}" "${srv_num}" || retstatus=1 - - # checks - if ! checkconfig "${datadir}" "${pidfile}" "${socket}" ; then - retstatus=2 ; continue - fi - if in_list "${pidfile}" "${pidfilelist}" ; then - eerror "Sorry, won't start with same pid-file: ${pidfile}" - retstatus=3 ; continue - fi - if in_list "${datadir}" "${datadirlist}" ; then - eerror "Sorry, won't start with same datadir: ${datadir}" - retstatus=4 ; continue - fi - if in_list "${socket}" "${socketlist}" ; then - eerror "Sorry, won't start with same socket: ${socket}" - retstatus=5 ; continue - fi - - einfo "Starting ${myservice} (${MY_CNF})" - - mysqld_thing="${MY_CNF:+"--defaults-file="}${MY_CNF}" - mysqld_thing="${mysqld_thing} ${unmanagedparams}" - mysqld_thing="${mysqld_thing} --basedir=${basedir}" - mysqld_thing="${mysqld_thing} --datadir=${datadir}" - mysqld_thing="${mysqld_thing} --pid-file=${pidfile}" - mysqld_thing="${mysqld_thing} --socket=${socket}" - - wdebug 2 "starting mysqld with: ${mysqld_thing}" - - if [[ ${ssd_thing} -eq 1 ]] ; then - tmpnice="${NICE:+"--nicelevel "}${NICE}" - start-stop-daemon --quiet ${DEBUG/*/"--verbose"} --start \ - --background ${tmpnice} --pidfile ${pidfile} \ - --exec ${basedir}/sbin/mysqld${MY_SUFFIX} -- ${mysqld_thing} \ - && sleep ${TIMEUNIT} - retstatus=$? - else - tmpnice="${NICE:+"nice -n "}${NICE}" - ${tmpnice} ${basedir}/sbin/mysqld${MY_SUFFIX} ${mysqld_thing} & - retstatus=0 - fi - - # only the first run is done by start-stop-daemon - ssd_thing="" - - # wait for socket creation - wdebug 1 - while ! [[ -S "${socket}" || "${STARTUPTIMEOUT}" -lt 1 || "${retstatus}" -ne 0 ]] ; do - STARTUPTIMEOUT=$(( STARTUPTIMEOUT - 1 )) - [[ ${DEBUG} -ge 1 ]] && echo -n "${STARTUPTIMEOUT}," - sleep ${TIMEUNIT} - done - wdebug 1 "" - if [[ ! -S "${socket}" ]] ; then - eerror "MySQL${MY_SUFFIX} NOT started (${retstatus})" - retstatus=1 - else - globretstatus=0 - pidfilelist="${pidfilelist}${pidfile}," - datadirlist="${datadirlist}${datadir}," - socketlist="${socketlist}${socket}," - echo "${srv_slot}${srv_num:+"_"}${srv_num}=${pidfile}" >> "${MYSQL_GLOB_PID_FILE}" - fi - done - # successfull if at least one mysqld started - wdebug 4 "<<< start()" - eend $globretstatus -} - -stop() { - get_slot_config &> /dev/null - MYSQL_GLOB_PID_FILE=${MYSQL_GLOB_PID_FILE:-"/var/run/svc-started-${SVCNAME/mysql/mysqld}"} - local runwhat pidfile shutdown_elem - local PID cnt timeout=${STOPTIMEOUT:-"120"} - local retstatus=0 - local shutdown_list="$(< "${MYSQL_GLOB_PID_FILE}" )" - - ebegin "Stopping ${myservice}" - wdebug 5 "MYSQL_GLOB_PID_FILE: ${MYSQL_GLOB_PID_FILE}" - wdebug 5 "shutdown_list: ${shutdown_list}" - for shutdown_elem in ${shutdown_list} ; do - runwhat=${shutdown_elem%%=*} - pidfile=${shutdown_elem#*=} - timeout=${STOPTIMEOUT:-"120"} - PID=$(< "${pidfile}" ) - wdebug 3 "runwhat ${runwhat}" - wdebug 3 "pidfile ${pidfile}" - wdebug 3 "timeout ${timeout}" - wdebug 3 "PID ${PID}" - - einfo "Stopping mysqld (${runwhat})" - - start-stop-daemon --quiet ${DEBUG/*/"--verbose"} --stop --pidfile "${pidfile}" & - wdebug 1 "" - while [[ -n "$PID" ]] \ - && $( ps -Ao pid | grep -q "^ *$PID$" ) \ - && [[ "${timeout}" -ge 1 ]] - do - timeout=$(($timeout - 1)) - [[ ${DEBUG} -ge 1 ]] && echo -n "$(( $STOPTIMEOUT - $timeout ))," - sleep ${TIMEUNIT} - done - [[ "${timeout}" -lt 1 ]] && retstatus=1 - done - sleep ${TIMEUNIT} - [[ "$retstatus" -eq 0 ]] && rm -f "$MYSQL_GLOB_PID_FILE" - eend ${retstatus} -} diff --git a/dev-db/mysql-init-scripts/files/mysqlmanager.conf.d b/dev-db/mysql-init-scripts/files/mysqlmanager.conf.d deleted file mode 100644 index 8666f71596cc..000000000000 --- a/dev-db/mysql-init-scripts/files/mysqlmanager.conf.d +++ /dev/null @@ -1,28 +0,0 @@ -# Here is where we define which server(s) to start. -# Additional parameters to be passed to mysqlmanager at startup may be added here, -# which will override the ones in "my.cnf". -# -# To avoid starting a server just comment it's definition -# here or it will rant (no default start). -# Last but not least, spaces are NOT allowed inside the parameters! -# -# Below are described some suggested parameters to use. -# The parameters not recognized will be passed through to the mysqlmanager directly. -# -# Parameter : description - -# ----------------+----------------------------------------------------------- -# mycnf : string [full path to my.cnf] -# : specify the path to my.cnf file to be used -# : may contain a [manager] section -# ----------------+----------------------------------------------------------- -# -# Basic default -# -#mysqlmanager_slot_0=() -# -# Start MySQL 5.0.X overriding the my.cnf path -#mysqlmanager_slot_500=( -# "mycnf=/home/test/my.cnf" -#) -# diff --git a/dev-db/mysql-init-scripts/files/mysqlmanager.rc6 b/dev-db/mysql-init-scripts/files/mysqlmanager.rc6 deleted file mode 100644 index dd8b703cd7d6..000000000000 --- a/dev-db/mysql-init-scripts/files/mysqlmanager.rc6 +++ /dev/null @@ -1,230 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-init-scripts/files/mysqlmanager.rc6,v 1.1 2007/01/12 16:54:20 chtekk Exp $ - -# external binaries used: which, sed, tac - -depend() { - use dns net localmount netmount nfsmount - #provide mysql -} - -# int in_list(char * elem, char * list) -function in_list() { - local elem=${1:-"none"} - local list=${2:-","} - - [[ "${list}" == "${list/,${elem},/}" ]] \ - && return 1 \ - || return 0 -} - -do_escape() { - # Ihatethisreallyverymuch - #echo "$1" | sed -e "s|'| |" -e "s|=|='|" -e "s|$|'|" - echo "$1" -} - -# int get_slot_config(srv_slot=0, srv_num) -get_slot_config() { - [[ ${DEBUG} -ge 4 ]] && einfo ">>> get_slot_config(\"${1}\", \"${2}\")" - - srv_slot="${1:-"0"}" - srv_num="${2}" - MY_SUFFIX="-${srv_slot}" - [[ "${MY_SUFFIX}" == '-0' ]] && MY_SUFFIX='' - - basedir="" pidfile="" socket="" - - local tmp_eval="mysqlmanager_slot_${srv_slot}${srv_num:+"_"}${srv_num}[@]" - local conf_d_parameters="${!tmp_eval}" - [[ ${conf_d_parameters[*]} == '()' ]] && conf_d_parameters='' - - MY_CNF="/etc/mysql${MY_SUFFIX}/my.cnf" - # summa of unmanaged parameters - # some parameters may be present multiple times - unmanagedparams="" - - # grab the parameters from conf.d/mysql definition - for my_default in ${conf_d_parameters[*]} ; do - case "${my_default}" in - mycnf=*) MY_CNF="${my_default#mycnf=}" ;; - basedir=*) basedir="${my_default#basedir=}" ;; - pid-file=*) pidfile="${my_default#pid-file=}" ;; - socket=*) socket="${my_default#socket=}" ;; - *=*) - # list of parameters we already have - # prepend "--" because my_print_defaults do it - unmanagedparams="${unmanagedparams} --$( do_escape "${my_default}" )" - ;; - *) - unmanagedparams="${unmanagedparams} --${my_default}" - ;; - esac - done - - if [[ ! -r "${MY_CNF}" ]] ; then - ewarn "Cannot access ${MY_CNF} !" - MY_CNF="" - my_defaults="" - else - local my_print_defaults="$(which my_print_defaults${MY_SUFFIX} 2>/dev/null)" - if [[ ! -x "${my_print_defaults}" ]] ; then - eerror "my_print_defaults NOT found or not executable" - my_defaults="" - else - my_defaults=$( ${my_print_defaults} \ - --loose-verbose \ - --config-file="${MY_CNF}" \ - manager ) - fi - fi - - # grab needed parameters from my.cnf, don't override the ones from - # conf.d/mysql - for my_default in ${my_defaults} ; do - case "${my_default}" in - --pid-file=*) - [[ -z "${pidfile}" ]] && pidfile="${my_default#--pid-file=}" ;; - --socket=*) - [[ -z "${socket}" ]] && socket="${my_default#--socket=}" ;; - esac - done - - # still empty, I'm in doubt if assign a default or break, will see - basedir="${basedir:-"/usr"}" - pidfile="${pidfile:-"/var/run/mysqld/mysqlmanager${MY_SUFFIX}.pid"}" - socket="${socket:-"/var/run/mysqld/mysqlmanager${MY_SUFFIX}.sock"}" - - if [[ ${DEBUG} -ge 3 ]] ; then - einfo "basedir => ${basedir}" - einfo "pidfile => ${pidfile}" - einfo "socket => ${socket}" - einfo "Unamanged => ${unmanagedparams}" - fi - - # push these out to the script - export MY_SUFFIX MY_CNF pidfile basedir socket - export unmanagedparams - [[ ${DEBUG} -ge 4 ]] && einfo "<<< get_slot_config() ok" - return 0 -} - -start() { - [[ ${DEBUG} -ge 4 ]] && einfo ">>> start()" - MYSQL_GLOB_PID_FILE=${MYSQL_GLOB_PID_FILE:-"/var/run/svc-started-${SVCNAME}"} - # servers are defined in /etc/conf.d/mysql - local serverlist=${!mysqlmanager_slot_*} - # provide default for empty conf.d/mysql - if [[ -z "${serverlist}" ]] ; then - serverlist=0 - export mysqlmanager_slot_0=() - fi - local retstatus timeout - local globretstatus=1 - local srv_slot srv_num - # server MUST NOT share same location for these - local pidfilelist=',' socketlist=',' - - # additional security - rm -f "${MYSQL_GLOB_PID_FILE}" ; touch "${MYSQL_GLOB_PID_FILE}" - if [[ $? -ne 0 ]] ; then - eerror "cannot create MYSQL_GLOB_PID_FILE: ${MYSQL_GLOB_PID_FILE}" - [[ ${DEBUG} -ge 4 ]] && einfo "<<< start() KO" - return 1 - fi - - ebegin - # try to start each server - for srv in ${serverlist[*]} ; do - einfo "working on ${srv}" - - srv_slot="${srv#mysqlmanager_slot_}" - if [[ "${srv_slot}" == "${srv_slot#*_}" ]] ; then - srv_num='' - else - srv_num="${srv_slot#*_}" - fi - srv_slot="${srv_slot%%_*}" - - retstatus=0 - get_slot_config "${srv_slot}" "${srv_num}" || retstatus=1 - - # timeout (seconds) before declaring the startup failed - - # pre_run checks - if [[ "$retstatus" -eq 0 ]] ; then - if in_list "${pidfile}" "${pidfilelist}" ; then - retstatus=3 - eerror "Sorry, won't start with same pid-file: ${pidfile}" - fi - if in_list "${socket}" "${socketlist}" ; then - retstatus=5 - eerror "Sorry, won't start with same socket: ${socket}" - fi - fi - - if [[ $retstatus -eq 0 ]] ; then - # additional security - rm -f ${pidfile} ${socket} - einfo "Starting mysqlmanager${MY_SUFFIX:+"_"}${srv_slot}${srv_num:+"_"}${srv_num} (${MY_CNF})" - - [[ ${DEBUG} -ge 2 ]] && echo "starting mysqlmanager with: "${basedir}/sbin/mysqlmanager${MY_SUFFIX} ${unmanagedparams} --pid-file=${pidfile} --socket=${socket} - - start-stop-daemon --quiet --start --background \ - --pidfile "${pidfile}" \ - --exec ${basedir}/sbin/mysqlmanager${MY_SUFFIX} \ - -- \ - ${MY_CNF:+"--defaults-file="}${MY_CNF} \ - ${unmanagedparams} \ - --pid-file=${pidfile} \ - --socket=${socket} - - retstatus=$? - - if [[ "${retstatus}" -eq 0 ]] ; then - pidfilelist="${pidfilelist}${pidfile}," - socketlist="${socketlist}${socket}," - globretstatus=0 - echo "${srv_slot}${srv_num:+"_"}${srv_num}=${pidfile}" >> "${MYSQL_GLOB_PID_FILE}" - fi - fi - done - # successfull if at least one mysqlmanager started - [[ ${DEBUG} -ge 4 ]] && einfo "<<< start()" - eend $globretstatus -} - -stop () { - MYSQL_GLOB_PID_FILE=${MYSQL_GLOB_PID_FILE:-"/var/run/svc-started-${SVCNAME}"} - local runwhat pidfile shutdown_elem - local PID cnt timeout - local retstatus=0 - local shutdown_list="$(< "${MYSQL_GLOB_PID_FILE}" )" - - # shutdown in reverse order - ebegin - for shutdown_elem in $shutdown_list; do - runwhat=${shutdown_elem%%=*} - pidfile=${shutdown_elem#*=} - timeout=${STOPTIMEOUT:-"10"} - - einfo "Stopping mysqlmanager (${runwhat})" - - PID=$(cat "${pidfile}" 2>/dev/null) - start-stop-daemon --stop --quiet --pidfile="${pidfile}" - [[ ${DEBUG} -ge 1 ]] && echo "" - while [[ -n "$PID" && $( kill -0 $PID 2>/dev/null ) && "${timeout}" -ge 1 ]] ; do - timeout=$(($timeout - 1)) - [[ ${DEBUG} -ge 1 ]] && echo -n $(( $STOPTIMEOUT - $timeout )) - sleep 1 - done - if [[ "${timeout}" -lt 1 ]] ; then - retstatus=$(( $retstatus + 1 )) - fi - done - - [[ "$retstatus" -eq 0 ]] && rm -f "$MYSQL_GLOB_PID_FILE" - eend $retstatus -} diff --git a/dev-db/mysql-init-scripts/mysql-init-scripts-1.2.ebuild b/dev-db/mysql-init-scripts/mysql-init-scripts-1.2.ebuild deleted file mode 100644 index f75b30513475..000000000000 --- a/dev-db/mysql-init-scripts/mysql-init-scripts-1.2.ebuild +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-init-scripts/mysql-init-scripts-1.2.ebuild,v 1.5 2014/08/10 20:01:21 slyfox Exp $ - -DESCRIPTION="Gentoo MySQL init scripts" -HOMEPAGE="http://www.gentoo.org/" -SRC_URI="" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd" -IUSE="" - -DEPEND="" -RDEPEND="" - -src_install() { - newconfd "${FILESDIR}/mysql.conf.d" "mysql" - newconfd "${FILESDIR}/mysqlmanager.conf.d" "mysqlmanager" - - newinitd "${FILESDIR}/mysql.rc6" "mysql" - newinitd "${FILESDIR}/mysqlmanager.rc6" "mysqlmanager" - - insinto /etc/logrotate.d - newins "${FILESDIR}/logrotate.mysql" "mysql" -} diff --git a/dev-db/mysql-init-scripts/mysql-init-scripts-2.0_pre1-r7.ebuild b/dev-db/mysql-init-scripts/mysql-init-scripts-2.0.ebuild index 7149c0599d50..f0ca91e57048 100644 --- a/dev-db/mysql-init-scripts/mysql-init-scripts-2.0_pre1-r7.ebuild +++ b/dev-db/mysql-init-scripts/mysql-init-scripts-2.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-init-scripts/mysql-init-scripts-2.0_pre1-r7.ebuild,v 1.2 2014/08/10 20:01:21 slyfox Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-init-scripts/mysql-init-scripts-2.0.ebuild,v 1.1 2014/08/21 03:08:13 grknight Exp $ EAPI=5 @@ -23,8 +23,8 @@ RDEPEND="!<dev-db/mysql-5.1" S=${WORKDIR} src_install() { - newconfd "${FILESDIR}/mysql-5.1.53-conf.d" "mysql" - newinitd "${FILESDIR}/mysql-5.1.67-init.d-r1" "mysql" + newconfd "${FILESDIR}/conf.d-${PV}" "mysql" + newinitd "${FILESDIR}/init.d-${PV}" "mysql" # systemd unit installation exeinto /usr/libexec |