summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-apps/kmod/ChangeLog13
-rw-r--r--sys-apps/kmod/files/kmod-static-nodes18
-rw-r--r--sys-apps/kmod/kmod-14-r1.ebuild60
-rw-r--r--sys-apps/kmod/kmod-9999.ebuild60
4 files changed, 116 insertions, 35 deletions
diff --git a/sys-apps/kmod/ChangeLog b/sys-apps/kmod/ChangeLog
index f5d61ec67399..3a7b3c5680a0 100644
--- a/sys-apps/kmod/ChangeLog
+++ b/sys-apps/kmod/ChangeLog
@@ -1,12 +1,15 @@
# ChangeLog for sys-apps/kmod
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/ChangeLog,v 1.104 2013/07/30 17:21:17 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/ChangeLog,v 1.105 2013/08/09 19:08:18 ssuominen Exp $
+
+ 09 Aug 2013; Samuli Suominen <ssuominen@gentoo.org> kmod-14-r1.ebuild,
+ kmod-9999.ebuild, +files/kmod-static-nodes:
+ Rename static-nodes init script to kmod-static-nodes as suggested by WilliamH
+ earlier. Support OpenRC 0.12 and the new tmpfiles /dev support.
+ Proper revision bump is required after OpenRC 0.12 is in tree.
30 Jul 2013; Samuli Suominen <ssuominen@gentoo.org> files/static-nodes:
- Remove unrequired "need localmount" and add required "after modules" to the
- init script depend()
- Revision bump later after tmpfiles /dev support is in portage and the
- init script has been finalized.
+ Remove unrequired "need localmount" from the init script depend()
26 Jul 2013; Samuli Suominen <ssuominen@gentoo.org> -kmod-12-r1.ebuild,
-kmod-14.ebuild:
diff --git a/sys-apps/kmod/files/kmod-static-nodes b/sys-apps/kmod/files/kmod-static-nodes
new file mode 100644
index 000000000000..43d843111314
--- /dev/null
+++ b/sys-apps/kmod/files/kmod-static-nodes
@@ -0,0 +1,18 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/files/kmod-static-nodes,v 1.1 2013/08/09 19:08:18 ssuominen Exp $
+
+description="Create list of required static device nodes for the current kernel"
+
+depend() {
+ after dev-mount
+ before tmpfiles.dev dev
+}
+
+start() {
+ ebegin "Creating list of required static device nodes for the current kernel"
+ checkpath -q -d /run/tmpfiles.d
+ kmod static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf
+ eend $?
+}
diff --git a/sys-apps/kmod/kmod-14-r1.ebuild b/sys-apps/kmod/kmod-14-r1.ebuild
index d653973f3ea0..1a836b6dcfa6 100644
--- a/sys-apps/kmod/kmod-14-r1.ebuild
+++ b/sys-apps/kmod/kmod-14-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/kmod-14-r1.ebuild,v 1.3 2013/07/23 11:54:33 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/kmod-14-r1.ebuild,v 1.4 2013/08/09 19:08:18 ssuominen Exp $
EAPI=5
@@ -99,7 +99,13 @@ src_install() {
insinto /lib/modprobe.d
doins "${T}"/usb-load-ehci-first.conf #260139
- use openrc && doinitd "${FILESDIR}"/static-nodes
+ if use openrc; then
+ if has_version '>=sys-apps/openrc-0.12'; then
+ doinitd "${FILESDIR}"/kmod-static-nodes
+ else
+ doinitd "${FILESDIR}"/static-nodes
+ fi
+ fi
}
pkg_postinst() {
@@ -111,21 +117,45 @@ pkg_postinst() {
fi
if use openrc; then
- # Add kmod to the boot runlevel automatically if this is the first install of this package.
- if [[ -z ${REPLACING_VERSIONS} ]]; then
- if [[ -x "${ROOT}"etc/init.d/static-nodes && -d "${ROOT}"etc/runlevels/boot ]]; then
- ln -s /etc/init.d/static-nodes "${ROOT}"/etc/runlevels/boot/static-nodes
+ # Add kmod to the runlevel automatically if this is the first install of this package.
+ if has_version '>=sys-apps/openrc-0.12'; then
+ if [[ -L ${ROOT}etc/runlevels/boot/static-nodes ]]; then
+ ewarn "Removing deprecated static-nodes init script from the boot runlevel"
+ rm -f "${ROOT}"etc/runlevels/boot/static-nodes
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ if [[ -x ${ROOT}etc/init.d/kmod-static-nodes && -d ${ROOT}etc/runlevels/sysinit ]]; then
+ ln -s /etc/init.d/kmod-static-nodes "${ROOT}"/etc/runlevels/sysinit/kmod-static-nodes
+ fi
+ fi
+
+ if [[ -e ${ROOT}etc/runlevels/sysinit ]]; then
+ if [[ ! -e ${ROOT}etc/runlevels/sysinit/kmod-static-nodes ]]; then
+ ewarn
+ ewarn "You need to add kmod-static-nodes to the boot runlevel."
+ ewarn "If you do not do this,"
+ ewarn "your system will not necessarily have the required static nodes!"
+ ewarn "Run this command:"
+ ewarn "\trc-update add kmod-static-nodes sysinit"
+ fi
+ fi
+ else
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ if [[ -x ${ROOT}etc/init.d/static-nodes && -d ${ROOT}etc/runlevels/boot ]]; then
+ ln -s /etc/init.d/static-nodes "${ROOT}"/etc/runlevels/boot/static-nodes
+ fi
fi
- fi
- if [[ -e "${ROOT}"etc/runlevels/boot ]]; then
- if [[ ! -e "${ROOT}"etc/runlevels/boot/static-nodes ]]; then
- ewarn
- ewarn "You need to add static-nodes to the boot runlevel."
- ewarn "If you do not do this,"
- ewarn "your system will not necessarily have the required static nodes!"
- ewarn "Run this command:"
- ewarn "\trc-update add static-nodes boot"
+ if [[ -e ${ROOT}etc/runlevels/boot ]]; then
+ if [[ ! -e ${ROOT}etc/runlevels/boot/static-nodes ]]; then
+ ewarn
+ ewarn "You need to add static-nodes to the boot runlevel."
+ ewarn "If you do not do this,"
+ ewarn "your system will not necessarily have the required static nodes!"
+ ewarn "Run this command:"
+ ewarn "\trc-update add static-nodes boot"
+ fi
fi
fi
fi
diff --git a/sys-apps/kmod/kmod-9999.ebuild b/sys-apps/kmod/kmod-9999.ebuild
index 148dd0899ff8..0a9a72e0d2d2 100644
--- a/sys-apps/kmod/kmod-9999.ebuild
+++ b/sys-apps/kmod/kmod-9999.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/kmod-9999.ebuild,v 1.59 2013/07/23 11:54:33 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/kmod-9999.ebuild,v 1.60 2013/08/09 19:08:18 ssuominen Exp $
EAPI=5
@@ -99,7 +99,13 @@ src_install() {
insinto /lib/modprobe.d
doins "${T}"/usb-load-ehci-first.conf #260139
- use openrc && doinitd "${FILESDIR}"/static-nodes
+ if use openrc; then
+ if has_version '>=sys-apps/openrc-0.12'; then
+ doinitd "${FILESDIR}"/kmod-static-nodes
+ else
+ doinitd "${FILESDIR}"/static-nodes
+ fi
+ fi
}
pkg_postinst() {
@@ -111,21 +117,45 @@ pkg_postinst() {
fi
if use openrc; then
- # Add kmod to the boot runlevel automatically if this is the first install of this package.
- if [[ -z ${REPLACING_VERSIONS} ]]; then
- if [[ -x "${ROOT}"etc/init.d/static-nodes && -d "${ROOT}"etc/runlevels/boot ]]; then
- ln -s /etc/init.d/static-nodes "${ROOT}"/etc/runlevels/boot/static-nodes
+ # Add kmod to the runlevel automatically if this is the first install of this package.
+ if has_version '>=sys-apps/openrc-0.12'; then
+ if [[ -L ${ROOT}etc/runlevels/boot/static-nodes ]]; then
+ ewarn "Removing deprecated static-nodes init script from the boot runlevel"
+ rm -f "${ROOT}"etc/runlevels/boot/static-nodes
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ if [[ -x ${ROOT}etc/init.d/kmod-static-nodes && -d ${ROOT}etc/runlevels/sysinit ]]; then
+ ln -s /etc/init.d/kmod-static-nodes "${ROOT}"/etc/runlevels/sysinit/kmod-static-nodes
+ fi
+ fi
+
+ if [[ -e ${ROOT}etc/runlevels/sysinit ]]; then
+ if [[ ! -e ${ROOT}etc/runlevels/sysinit/kmod-static-nodes ]]; then
+ ewarn
+ ewarn "You need to add kmod-static-nodes to the boot runlevel."
+ ewarn "If you do not do this,"
+ ewarn "your system will not necessarily have the required static nodes!"
+ ewarn "Run this command:"
+ ewarn "\trc-update add kmod-static-nodes sysinit"
+ fi
+ fi
+ else
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ if [[ -x ${ROOT}etc/init.d/static-nodes && -d ${ROOT}etc/runlevels/boot ]]; then
+ ln -s /etc/init.d/static-nodes "${ROOT}"/etc/runlevels/boot/static-nodes
+ fi
fi
- fi
- if [[ -e "${ROOT}"etc/runlevels/boot ]]; then
- if [[ ! -e "${ROOT}"etc/runlevels/boot/static-nodes ]]; then
- ewarn
- ewarn "You need to add static-nodes to the boot runlevel."
- ewarn "If you do not do this,"
- ewarn "your system will not necessarily have the required static nodes!"
- ewarn "Run this command:"
- ewarn "\trc-update add static-nodes boot"
+ if [[ -e ${ROOT}etc/runlevels/boot ]]; then
+ if [[ ! -e ${ROOT}etc/runlevels/boot/static-nodes ]]; then
+ ewarn
+ ewarn "You need to add static-nodes to the boot runlevel."
+ ewarn "If you do not do this,"
+ ewarn "your system will not necessarily have the required static nodes!"
+ ewarn "Run this command:"
+ ewarn "\trc-update add static-nodes boot"
+ fi
fi
fi
fi