| 1 |
williamh |
1.1 |
# Copyright 1999-2012 Gentoo Foundation |
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
williamh |
1.10 |
# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev-init-scripts/udev-init-scripts-9999.ebuild,v 1.9 2012/08/01 17:15:24 williamh Exp $ |
| 4 |
williamh |
1.1 |
|
| 5 |
|
|
EAPI=4 |
| 6 |
|
|
|
| 7 |
williamh |
1.5 |
if [ "${PV}" = "9999" ]; then |
| 8 |
williamh |
1.10 |
EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/udev-gentoo-scripts.git" |
| 9 |
williamh |
1.5 |
inherit git-2 |
| 10 |
|
|
fi |
| 11 |
williamh |
1.1 |
|
| 12 |
|
|
DESCRIPTION="udev startup scripts for openrc" |
| 13 |
|
|
HOMEPAGE="http://www.gentoo.org" |
| 14 |
|
|
|
| 15 |
|
|
LICENSE="GPL-2" |
| 16 |
|
|
SLOT="0" |
| 17 |
|
|
IUSE="" |
| 18 |
|
|
|
| 19 |
|
|
if [ "${PV}" != "9999" ]; then |
| 20 |
|
|
SRC_URI="mirror://gentoo/${P}.tar.bz2" |
| 21 |
|
|
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
| 22 |
|
|
fi |
| 23 |
|
|
|
| 24 |
williamh |
1.10 |
RESTRICT="test" |
| 25 |
|
|
|
| 26 |
williamh |
1.9 |
DEPEND="" |
| 27 |
|
|
RDEPEND=">=sys-fs/udev-187 |
| 28 |
|
|
sys-apps/openrc |
| 29 |
|
|
!<sys-fs/udev-186" |
| 30 |
williamh |
1.1 |
|
| 31 |
|
|
pkg_postinst() |
| 32 |
|
|
{ |
| 33 |
|
|
# If we are building stages, add udev to the sysinit runlevel automatically. |
| 34 |
|
|
if use build |
| 35 |
|
|
then |
| 36 |
williamh |
1.9 |
if [[ -x "${ROOT}"/etc/init.d/udev \ |
| 37 |
williamh |
1.1 |
&& -d "${ROOT}"/etc/runlevels/sysinit ]] |
| 38 |
|
|
then |
| 39 |
|
|
ln -s /etc/init.d/udev "${ROOT}"/etc/runlevels/sysinit/udev |
| 40 |
|
|
fi |
| 41 |
|
|
fi |
| 42 |
|
|
|
| 43 |
|
|
# migration to >=openrc-0.4 |
| 44 |
williamh |
1.9 |
if [[ -e "${ROOT}"/etc/runlevels/sysinit \ |
| 45 |
|
|
&& ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]] |
| 46 |
williamh |
1.1 |
then |
| 47 |
|
|
ewarn |
| 48 |
|
|
ewarn "You need to add the udev init script to the runlevel sysinit," |
| 49 |
williamh |
1.9 |
ewarn "otherwise your system will not be able to boot" |
| 50 |
williamh |
1.1 |
ewarn "after updating to >=openrc-0.4.0" |
| 51 |
|
|
ewarn "Run this to enable udev for >=openrc-0.4.0:" |
| 52 |
|
|
ewarn "\trc-update add udev sysinit" |
| 53 |
|
|
ewarn |
| 54 |
|
|
fi |
| 55 |
|
|
|
| 56 |
williamh |
1.9 |
ewarn "The udev-postmount service has been removed because the reasons for" |
| 57 |
|
|
ewarn "its existance have been removed upstream." |
| 58 |
|
|
ewarn "Please remove it from your runlevels." |
| 59 |
williamh |
1.1 |
} |