summaryrefslogtreecommitdiff
path: root/sys-fs/udev-init-scripts/udev-init-scripts-27.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-fs/udev-init-scripts/udev-init-scripts-27.ebuild
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-fs/udev-init-scripts/udev-init-scripts-27.ebuild')
-rw-r--r--sys-fs/udev-init-scripts/udev-init-scripts-27.ebuild64
1 files changed, 64 insertions, 0 deletions
diff --git a/sys-fs/udev-init-scripts/udev-init-scripts-27.ebuild b/sys-fs/udev-init-scripts/udev-init-scripts-27.ebuild
new file mode 100644
index 000000000000..41d24a9a1b05
--- /dev/null
+++ b/sys-fs/udev-init-scripts/udev-init-scripts-27.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+if [ "${PV}" = "9999" ]; then
+ EGIT_REPO_URI="git://anongit.gentoo.org/proj/udev-gentoo-scripts.git"
+ inherit git-r3
+else
+ SRC_URI="https://dev.gentoo.org/~williamh/dist/${P}.tar.bz2"
+ KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+fi
+
+inherit eutils
+
+DESCRIPTION="udev startup scripts for openrc"
+HOMEPAGE="https://www.gentoo.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+RESTRICT="test"
+
+RDEPEND=">=virtual/udev-180
+ !<sys-fs/udev-186
+ !<sys-apps/openrc-0.13"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch_user
+}
+
+pkg_postinst() {
+ # Add udev to the sysinit runlevel automatically if this is
+ # the first install of this package.
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ if [[ ! -d ${ROOT%/}/etc/runlevels/sysinit ]]; then
+ mkdir -p "${ROOT%/}"/etc/runlevels/sysinit
+ fi
+ if [[ -x ${ROOT%/}/etc/init.d/udev ]]; then
+ ln -s /etc/init.d/udev "${ROOT%/}"/etc/runlevels/sysinit/udev
+ fi
+ fi
+
+ # Warn the user about adding udev to their sysinit runlevel
+ if [[ -e ${ROOT%/}/etc/runlevels/sysinit ]]; then
+ if [[ ! -e ${ROOT%/}/etc/runlevels/sysinit/udev ]]; then
+ ewarn
+ ewarn "You need to add udev to the sysinit runlevel."
+ ewarn "If you do not do this,"
+ ewarn "your system will not be able to boot!"
+ ewarn "Run this command:"
+ ewarn "\trc-update add udev sysinit"
+ fi
+ fi
+
+ if ! has_version "sys-fs/eudev[rule-generator]" && \
+ [[ -x $(type -P rc-update) ]] && rc-update show | grep udev-postmount | grep -qs 'boot\|default\|sysinit'; then
+ ewarn "The udev-postmount service has been removed because the reasons for"
+ ewarn "its existance have been removed upstream."
+ ewarn "Please remove it from your runlevels."
+ fi
+}