diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2008-06-20 23:57:19 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2008-06-20 23:57:19 +0000 |
commit | ceb01d914aef7e636f221323bf62fddf4f49cdfb (patch) | |
tree | 4d20875f6f9a022e948245c2dcf30ef56d5386e4 /sys-fs/multipath-tools/multipath-tools-0.4.8.ebuild | |
parent | remove unused versions (diff) | |
download | historical-ceb01d914aef7e636f221323bf62fddf4f49cdfb.tar.gz historical-ceb01d914aef7e636f221323bf62fddf4f49cdfb.tar.bz2 historical-ceb01d914aef7e636f221323bf62fddf4f49cdfb.zip |
Make multipath-tools work for early boot environments for both baselayout1 and baselayout2. Please read the postinst output if multipath is critical to your environment!
Package-Manager: portage-2.2_pre8/cvs/Linux 2.6.26-rc4-00103-g1beee8d x86_64
Diffstat (limited to 'sys-fs/multipath-tools/multipath-tools-0.4.8.ebuild')
-rw-r--r-- | sys-fs/multipath-tools/multipath-tools-0.4.8.ebuild | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/sys-fs/multipath-tools/multipath-tools-0.4.8.ebuild b/sys-fs/multipath-tools/multipath-tools-0.4.8.ebuild new file mode 100644 index 000000000000..d064b13069cd --- /dev/null +++ b/sys-fs/multipath-tools/multipath-tools-0.4.8.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/multipath-tools/multipath-tools-0.4.8.ebuild,v 1.1 2008/06/20 23:57:18 robbat2 Exp $ + +inherit eutils toolchain-funcs + +DESCRIPTION="Device mapper target autoconfig" +HOMEPAGE="http://christophe.varoqui.free.fr/" +SRC_URI="http://christophe.varoqui.free.fr/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND=">=sys-fs/device-mapper-1.00.19-r1 + sys-fs/udev + sys-fs/sysfsutils" +DEPEND="${RDEPEND}" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${PN}-0.4.8-build.patch + # Merged together + #epatch "${FILESDIR}"/${PN}-0.4.7-udev-rules.patch +} + +src_compile() { + emake -j1 CC="$(tc-getCC)" || die "emake failed" +} + +src_install() { + dodir /sbin /usr/share/man/man8 + make DESTDIR="${D}" install || die "install failed" + + insinto /etc + newins "${S}"/multipath.conf.annotated multipath.conf + fperms 644 /etc/udev/rules.d/65-multipath.rules + fperms 644 /etc/udev/rules.d/66-kpartx.rules + # This is the monitoring daemon + newinitd "${FILESDIR}"/rc-multipathd multipathd + # This is the init script that fires the multipath addon for baselayout2 + newinitd "${FILESDIR}"/init.d-multipath multipath + # Handle early-boot startup as well as shutdown of multipath devices + insinto /lib/rcscripts/addons + doins "${FILESDIR}"/multipath-start.sh + doins "${FILESDIR}"/multipath-stop.sh + + dodoc multipath.conf.* + dodoc AUTHOR ChangeLog FAQ README TODO + docinto kpartx; dodoc kpartx/ChangeLog kpartx/README +} + +pkg_preinst() { + # The dev.d script was previously wrong and is now removed (the udev rules + # file does the job instead), but it won't be removed from live systems due + # to cfgprotect. + # This should help out a little... + if [[ -e ${ROOT}/etc/dev.d/block/multipath.dev ]] ; then + mkdir -p "${D}"/etc/dev.d/block + echo "# Please delete this file. It is obsoleted by /etc/udev/rules.d/65-multipath.rules" \ + > "${D}"/etc/dev.d/block/multipath.dev + fi +} +pkg_postinst() { + elog "If you need multipath on your system, you should ensure that a" + elog "'multipath' entry is present in your RC_VOLUME_ORDER variable!" + elog "If you use baselayout2, you must add 'multipath' into" + elog "your boot runlevel!" +} |