/[gentoo-x86]/sys-fs/udev-init-scripts/udev-init-scripts-9999.ebuild
Gentoo

Contents of /sys-fs/udev-init-scripts/udev-init-scripts-9999.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.28 - (show annotations) (download)
Sat Apr 5 10:58:31 2014 UTC (3 months ago) by ssuominen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.27: +13 -22 lines
Synchronize use of ROOT

(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-fs/udev-init-scripts/udev-init-scripts-9999.ebuild,v 1.27 2014/04/03 19:16:01 ssuominen Exp $
4
5 EAPI=5
6
7 inherit eutils
8
9 if [ "${PV}" = "9999" ]; then
10 EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/udev-gentoo-scripts.git"
11 inherit git-2
12 fi
13
14 DESCRIPTION="udev startup scripts for openrc"
15 HOMEPAGE="http://www.gentoo.org"
16
17 LICENSE="GPL-2"
18 SLOT="0"
19 IUSE=""
20
21 if [ "${PV}" != "9999" ]; then
22 SRC_URI="http://dev.gentoo.org/~williamh/dist/${P}.tar.bz2"
23 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
24 fi
25
26 RESTRICT="test"
27
28 RDEPEND=">=virtual/udev-180
29 !<sys-fs/udev-186"
30 DEPEND="${RDEPEND}"
31
32 src_prepare() {
33 epatch_user
34 }
35
36 pkg_postinst() {
37 # Add udev and udev-mount to the sysinit runlevel automatically if this is
38 # the first install of this package.
39 if [[ -z ${REPLACING_VERSIONS} ]]; then
40 if [[ ! -d ${ROOT%/}/etc/runlevels/sysinit ]]; then
41 mkdir -p "${ROOT%/}"/etc/runlevels/sysinit
42 fi
43 if [[ -x ${ROOT%/}/etc/init.d/udev ]]; then
44 ln -s /etc/init.d/udev "${ROOT%/}"/etc/runlevels/sysinit/udev
45 fi
46 if [[ -x ${ROOT%/}/etc/init.d/udev-mount ]]; then
47 ln -s /etc/init.d/udev-mount \
48 "${ROOT%/}"/etc/runlevels/sysinit/udev-mount
49 fi
50 fi
51
52 # Warn the user about adding the scripts to their sysinit runlevel
53 if [[ -e ${ROOT%/}/etc/runlevels/sysinit ]]; then
54 if [[ ! -e ${ROOT%/}/etc/runlevels/sysinit/udev ]]; then
55 ewarn
56 ewarn "You need to add udev to the sysinit runlevel."
57 ewarn "If you do not do this,"
58 ewarn "your system will not be able to boot!"
59 ewarn "Run this command:"
60 ewarn "\trc-update add udev sysinit"
61 fi
62 if [[ ! -e ${ROOT%/}/etc/runlevels/sysinit/udev-mount ]]; then
63 ewarn
64 ewarn "You need to add udev-mount to the sysinit runlevel."
65 ewarn "If you do not do this,"
66 ewarn "your system will not be able to boot!"
67 ewarn "Run this command:"
68 ewarn "\trc-update add udev-mount sysinit"
69 fi
70 fi
71
72 if ! has_version "sys-fs/eudev[rule-generator]" && \
73 [[ -x $(type -P rc-update) ]] && rc-update show | grep udev-postmount | grep -qs 'boot\|default\|sysinit'; then
74 ewarn "The udev-postmount service has been removed because the reasons for"
75 ewarn "its existance have been removed upstream."
76 ewarn "Please remove it from your runlevels."
77 fi
78 }

  ViewVC Help
Powered by ViewVC 1.1.20