/[gentoo-x86]/dev-db/mysql-init-scripts/mysql-init-scripts-2.0_pre1-r3.ebuild
Gentoo

Contents of /dev-db/mysql-init-scripts/mysql-init-scripts-2.0_pre1-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Fri Jan 18 01:51:47 2013 UTC (15 months ago) by robbat2
Branch: MAIN
Bug #423387: /var/run fix. Bug #452562/#175783: checkbashisms.

(Portage version: 2.2.0_alpha144/cvs/Linux x86_64, unsigned Manifest commit)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-init-scripts/mysql-init-scripts-2.0_pre1-r2.ebuild,v 1.8 2012/03/08 14:57:22 ranger Exp $
4
5 DESCRIPTION="Gentoo MySQL init scripts."
6 HOMEPAGE="http://www.gentoo.org/"
7 SRC_URI=""
8
9 LICENSE="GPL-2"
10 SLOT="0"
11 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
12 IUSE=""
13
14 DEPEND=""
15 # This _will_ break with MySQL 5.0, 4.x, 3.x
16 # It also NEEDS openrc for the save_options/get_options builtins.
17 RDEPEND="!<dev-db/mysql-5.1
18 sys-apps/openrc"
19
20 src_install() {
21 newconfd "${FILESDIR}/mysql-5.1.53-conf.d" "mysql"
22 newinitd "${FILESDIR}/mysql-5.1.67-init.d" "mysql"
23
24 insinto /etc/logrotate.d
25 newins "${FILESDIR}/logrotate.mysql" "mysql"
26 }
27
28 pkg_postinst() {
29 grep -sq mysql_slot "${ROOT}"/etc/conf.d/mysql
30 old_conf_present=$?
31 grep -sq get_slot_config "${ROOT}"/etc/init.d/mysql
32 old_init_present=$?
33
34 egrep -sq 'MY_CNF|MY_ARGS|(STARTUP|STOP)_TIMEOUT' "${ROOT}"/etc/conf.d/mysql
35 new_conf_present=$?
36 egrep -sq 'MY_ARGS|STOP_TIMEOUT' "${ROOT}"/etc/init.d/mysql
37 new_init_present=$?
38
39 einfo "Please note if you are using multiple internal 'slots' in the old"
40 einfo "conf.d fille, that you should use multiple init files now."
41 echo old $old_conf_present $old_init_present
42 echo new $new_conf_present $new_init_present
43
44 # new scripts present
45 if [ $new_conf_present -eq 0 -a $new_init_present -eq 0 -a \
46 $old_conf_present -eq 1 -a $old_init_present -eq 1 ]; then
47 :
48 elif [ $old_conf_present -eq 0 -a $old_init_present -eq 0 -a \
49 $new_conf_present -eq 1 -a $new_init_present -eq 1 ]; then
50 ewarn "Old /etc/init.d/mysql and /etc/conf.d/mysql still present!"
51 ewarn "Update both of those files to the new versions!"
52 else
53 eerror "DANGER, mixed update of /etc/init.d/mysql and /etc/conf.d/mysql"
54 eerror "detected! You must update BOTH to the new versions"
55 fi
56 }

  ViewVC Help
Powered by ViewVC 1.1.20