summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Schwarzott <zzam@gentoo.org>2008-12-19 22:19:24 +0000
committerMatthias Schwarzott <zzam@gentoo.org>2008-12-19 22:19:24 +0000
commit8c417684cfc6e6708fbc3ec112025a43f2a3140a (patch)
treebb7ebd97357397785f9b6f040592d69a848a06e1 /sys-apps
parentdepend on >=dev-python/pyrex-0.9.6 to solve some python RAPIError exceptions (diff)
downloadgentoo-2-8c417684cfc6e6708fbc3ec112025a43f2a3140a.tar.gz
gentoo-2-8c417684cfc6e6708fbc3ec112025a43f2a3140a.tar.bz2
gentoo-2-8c417684cfc6e6708fbc3ec112025a43f2a3140a.zip
Try to auto-detect on update, if the old version had udev enabled, and add it to sysinit runlevel if yes.
(Portage version: 2.1.6.1/cvs/Linux 2.6.27-gentoo-r1 i686)
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/openrc/ChangeLog7
-rw-r--r--sys-apps/openrc/openrc-0.4.0.ebuild26
-rw-r--r--sys-apps/openrc/openrc-9999.ebuild26
3 files changed, 56 insertions, 3 deletions
diff --git a/sys-apps/openrc/ChangeLog b/sys-apps/openrc/ChangeLog
index aad4fddbe90c..5541007dddde 100644
--- a/sys-apps/openrc/ChangeLog
+++ b/sys-apps/openrc/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-apps/openrc
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/ChangeLog,v 1.48 2008/12/17 21:41:56 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/ChangeLog,v 1.49 2008/12/19 22:19:24 zzam Exp $
+
+ 19 Dec 2008; Matthias Schwarzott <zzam@gentoo.org> openrc-0.4.0.ebuild,
+ openrc-9999.ebuild:
+ Try to auto-detect on update, if the old version had udev enabled, and add
+ it to sysinit runlevel if yes.
17 Dec 2008; Doug Goldstein <cardoe@gentoo.org> openrc-0.3.0-r1.ebuild,
openrc-0.4.0.ebuild, openrc-9999.ebuild:
diff --git a/sys-apps/openrc/openrc-0.4.0.ebuild b/sys-apps/openrc/openrc-0.4.0.ebuild
index 6849e7e3e2d5..353223552504 100644
--- a/sys-apps/openrc/openrc-0.4.0.ebuild
+++ b/sys-apps/openrc/openrc-0.4.0.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-0.4.0.ebuild,v 1.2 2008/12/17 21:41:56 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-0.4.0.ebuild,v 1.3 2008/12/19 22:19:24 zzam Exp $
inherit eutils flag-o-matic multilib toolchain-funcs
@@ -174,6 +174,25 @@ pkg_preinst() {
# termencoding was added in 0.2.1 and needed in boot
has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding
+ # openrc-0.4.0 no longer loads the udev addon
+ enable_udev=0
+ if [[ ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]] && \
+ [[ -e "${ROOT}"/etc/init.d/udev ]] && \
+ ! has_version ">=sys-apps/openrc-0.4.0"
+ then
+ # make sure udev is in sysinit if it was enabled before
+ local rc_devices=$(
+ [[ -f /etc/rc.conf ]] && source /etc/rc.conf
+ [[ -f /etc/conf.d/rc ]] && source /etc/conf.d/rc
+ echo "${rc_devices:-${RC_DEVICES:-auto}}"
+ )
+ case ${rc_devices} in
+ udev|auto)
+ enable_udev=1
+ ;;
+ esac
+ fi
+
# skip remaining migration if we already have openrc installed
has_version sys-apps/openrc && return 0
@@ -272,6 +291,11 @@ pkg_postinst() {
fi
fi
+ if [[ "$enable_udev" = 1 ]]; then
+ elog "Auto adding udev init script to the sysinit runlevel"
+ ln -sf /etc/init.d/udev "${ROOT}"/etc/runlevels/sysinit/udev
+ fi
+
# update the dependency tree bug #224171
[[ "${ROOT}" = "/" ]] && "${ROOT}/${LIBDIR}"/rc/bin/rc-depend -u
diff --git a/sys-apps/openrc/openrc-9999.ebuild b/sys-apps/openrc/openrc-9999.ebuild
index 73872f1c987f..6533b932242b 100644
--- a/sys-apps/openrc/openrc-9999.ebuild
+++ b/sys-apps/openrc/openrc-9999.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-9999.ebuild,v 1.40 2008/12/17 21:41:56 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-9999.ebuild,v 1.41 2008/12/19 22:19:24 zzam Exp $
inherit eutils flag-o-matic multilib toolchain-funcs
@@ -170,6 +170,25 @@ pkg_preinst() {
fi
done
+ # openrc-0.4.0 no longer loads the udev addon
+ enable_udev=0
+ if [[ ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]] && \
+ [[ -e "${ROOT}"/etc/init.d/udev ]] && \
+ ! has_version ">=sys-apps/openrc-0.4.0"
+ then
+ # make sure udev is in sysinit if it was enabled before
+ local rc_devices=$(
+ [[ -f /etc/rc.conf ]] && source /etc/rc.conf
+ [[ -f /etc/conf.d/rc ]] && source /etc/conf.d/rc
+ echo "${rc_devices:-${RC_DEVICES:-auto}}"
+ )
+ case ${rc_devices} in
+ udev|auto)
+ enable_udev=1
+ ;;
+ esac
+ fi
+
# skip remaining migration if we already have openrc installed
has_version sys-apps/openrc && return 0
@@ -266,6 +285,11 @@ pkg_postinst() {
fi
fi
+ if [[ "$enable_udev" = 1 ]]; then
+ elog "Auto adding udev init script to the sysinit runlevel"
+ ln -sf /etc/init.d/udev "${ROOT}"/etc/runlevels/sysinit/udev
+ fi
+
# update the dependency tree bug #224171
[[ "${ROOT}" = "/" ]] && "${ROOT}/${LIBDIR}"/rc/bin/rc-depend -u