summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-08-23 09:19:10 +0000
committerMike Frysinger <vapier@gentoo.org>2009-08-23 09:19:10 +0000
commit1d35ba8d952d025a45b04b8750096054219213e7 (patch)
treeddaf0e722b92abbe5d372e8ad05bb99d39672e1d /sys-apps/openrc
parentppc stable #280590 (diff)
downloadgentoo-2-1d35ba8d952d025a45b04b8750096054219213e7.tar.gz
gentoo-2-1d35ba8d952d025a45b04b8750096054219213e7.tar.bz2
gentoo-2-1d35ba8d952d025a45b04b8750096054219213e7.zip
Make sure ${ROOT}/etc/runlevels exists early enough #277323 by Ed Wildgoose.
(Portage version: 2.2_rc38/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/openrc')
-rw-r--r--sys-apps/openrc/ChangeLog7
-rw-r--r--sys-apps/openrc/openrc-0.4.3-r3.ebuild15
-rw-r--r--sys-apps/openrc/openrc-9999.ebuild15
3 files changed, 30 insertions, 7 deletions
diff --git a/sys-apps/openrc/ChangeLog b/sys-apps/openrc/ChangeLog
index 77d21c302938..ede0b2c5f388 100644
--- a/sys-apps/openrc/ChangeLog
+++ b/sys-apps/openrc/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-apps/openrc
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/ChangeLog,v 1.75 2009/07/11 15:12:25 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/ChangeLog,v 1.76 2009/08/23 09:19:10 vapier Exp $
+
+ 23 Aug 2009; Mike Frysinger <vapier@gentoo.org> openrc-0.4.3-r3.ebuild,
+ openrc-9999.ebuild:
+ Make sure ${ROOT}/etc/runlevels exists early enough #277323 by Ed
+ Wildgoose.
11 Jul 2009; Robin H. Johnson <robbat2@gentoo.org>
+files/0.4.3/0003-command-line-size-fix.patch, openrc-0.4.3-r3.ebuild:
diff --git a/sys-apps/openrc/openrc-0.4.3-r3.ebuild b/sys-apps/openrc/openrc-0.4.3-r3.ebuild
index bb476bb3da1b..c562ec3f9aaa 100644
--- a/sys-apps/openrc/openrc-0.4.3-r3.ebuild
+++ b/sys-apps/openrc/openrc-0.4.3-r3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-0.4.3-r3.ebuild,v 1.3 2009/07/11 15:12:25 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-0.4.3-r3.ebuild,v 1.4 2009/08/23 09:19:10 vapier Exp $
inherit eutils flag-o-matic multilib toolchain-funcs
@@ -111,11 +111,19 @@ src_install() {
add_boot_init() {
local initd=$1
- # if the initscript is not going to be installed and is not
+ # if the initscript is not going to be installed and is not
# currently installed, return
[[ -e ${D}/etc/init.d/${initd} || -e ${ROOT}/etc/init.d/${initd} ]] \
|| return
[[ -e ${ROOT}/etc/runlevels/boot/${initd} ]] && return
+
+ # if runlevels dont exist just yet, then create it but still flag
+ # to pkg_postinst that it needs real setup #277323
+ if [[ ! -d ${ROOT}/etc/runlevels/boot ]] ; then
+ mkdir -p "${ROOT}"/etc/runlevels/boot
+ touch "${ROOT}"/etc/runlevels/.add_boot_init.created
+ fi
+
elog "Auto-adding '${initd}' service to your boot runlevel"
ln -snf /etc/init.d/${initd} "${ROOT}"/etc/runlevels/boot/${initd}
}
@@ -288,9 +296,10 @@ pkg_postinst() {
[[ -e ${T}/net && ! -e ${ROOT}/etc/conf.d/net ]] && mv "${T}"/net "${ROOT}"/etc/conf.d/net
# Make our runlevels if they don't exist
- if [[ ! -e ${ROOT}/etc/runlevels ]] ; then
+ if [[ ! -e ${ROOT}/etc/runlevels ]] || [[ -e ${ROOT}/etc/runlevels/.add_boot_init.created ]] ; then
einfo "Copying across default runlevels"
cp -RPp "${ROOT}"/usr/share/${PN}/runlevels "${ROOT}"/etc
+ rm -f "${ROOT}"/etc/runlevels/.add_boot_init.created
else
if [[ ! -e ${ROOT}/etc/runlevels/sysinit/devfs ]] ; then
mkdir -p "${ROOT}"/etc/runlevels/sysinit
diff --git a/sys-apps/openrc/openrc-9999.ebuild b/sys-apps/openrc/openrc-9999.ebuild
index 4ad8fb4b7599..633f95cc20a8 100644
--- a/sys-apps/openrc/openrc-9999.ebuild
+++ b/sys-apps/openrc/openrc-9999.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 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.50 2009/06/15 11:11:23 zzam Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-9999.ebuild,v 1.51 2009/08/23 09:19:10 vapier Exp $
inherit eutils flag-o-matic multilib toolchain-funcs
@@ -107,11 +107,19 @@ src_install() {
add_boot_init() {
local initd=$1
- # if the initscript is not going to be installed and is not
+ # if the initscript is not going to be installed and is not
# currently installed, return
[[ -e ${D}/etc/init.d/${initd} || -e ${ROOT}/etc/init.d/${initd} ]] \
|| return
[[ -e ${ROOT}/etc/runlevels/boot/${initd} ]] && return
+
+ # if runlevels dont exist just yet, then create it but still flag
+ # to pkg_postinst that it needs real setup #277323
+ if [[ ! -d ${ROOT}/etc/runlevels/boot ]] ; then
+ mkdir -p "${ROOT}"/etc/runlevels/boot
+ touch "${ROOT}"/etc/runlevels/.add_boot_init.created
+ fi
+
elog "Auto-adding '${initd}' service to your boot runlevel"
ln -snf /etc/init.d/${initd} "${ROOT}"/etc/runlevels/boot/${initd}
}
@@ -284,9 +292,10 @@ pkg_postinst() {
[[ -e ${T}/net && ! -e ${ROOT}/etc/conf.d/net ]] && mv "${T}"/net "${ROOT}"/etc/conf.d/net
# Make our runlevels if they don't exist
- if [[ ! -e ${ROOT}/etc/runlevels ]] ; then
+ if [[ ! -e ${ROOT}/etc/runlevels ]] || [[ -e ${ROOT}/etc/runlevels/.add_boot_init.created ]] ; then
einfo "Copying across default runlevels"
cp -RPp "${ROOT}"/usr/share/${PN}/runlevels "${ROOT}"/etc
+ rm -f "${ROOT}"/etc/runlevels/.add_boot_init.created
else
if [[ ! -e ${ROOT}/etc/runlevels/sysinit/devfs ]] ; then
mkdir -p "${ROOT}"/etc/runlevels/sysinit