diff options
author | Benedikt Boehm <hollow@gentoo.org> | 2005-09-30 14:02:47 +0000 |
---|---|---|
committer | Benedikt Boehm <hollow@gentoo.org> | 2005-09-30 14:02:47 +0000 |
commit | 1d67d9aed82be5bbe78523d71b2ba6cda23b5a2f (patch) | |
tree | 817365744cb71aed49f0bf037226cb81a266c444 /sys-apps | |
parent | Remove unnecessary global DISABLE_SANDBOX, fixing bug #103184 (diff) | |
download | historical-1d67d9aed82be5bbe78523d71b2ba6cda23b5a2f.tar.gz historical-1d67d9aed82be5bbe78523d71b2ba6cda23b5a2f.tar.bz2 historical-1d67d9aed82be5bbe78523d71b2ba6cda23b5a2f.zip |
fix halt/reboot borkage + minor fixes
Package-Manager: portage-2.0.52-r1
Diffstat (limited to 'sys-apps')
5 files changed, 665 insertions, 35 deletions
diff --git a/sys-apps/baselayout-vserver/ChangeLog b/sys-apps/baselayout-vserver/ChangeLog index d55180106cfc..89524efb423f 100644 --- a/sys-apps/baselayout-vserver/ChangeLog +++ b/sys-apps/baselayout-vserver/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-apps/baselayout-vserver # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout-vserver/ChangeLog,v 1.13 2005/09/27 13:36:23 hollow Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout-vserver/ChangeLog,v 1.14 2005/09/30 14:02:47 hollow Exp $ + + 30 Sep 2005; Benedikt Boehm <hollow@gentoo.org> + +files/baselayout-vserver-1.11.13-cleanup.patch, + -files/baselayout-vserver-1.11.13-init-timeout-fix.patch, + baselayout-vserver-1.11.13-r1.ebuild: + fix halt/reboot borkage + minor fixes *baselayout-vserver-1.11.13-r1 (27 Sep 2005) diff --git a/sys-apps/baselayout-vserver/Manifest b/sys-apps/baselayout-vserver/Manifest index be564c5ad246..1e66faff0254 100644 --- a/sys-apps/baselayout-vserver/Manifest +++ b/sys-apps/baselayout-vserver/Manifest @@ -1,24 +1,24 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -MD5 5a22687957c3f2cf3ae5d6e217b792cf ChangeLog 2658 +MD5 8b3f490eb3185eeb4b4cbe754e3aa2f9 ChangeLog 2900 MD5 62648662d2305c044a9c92f90c624098 baselayout-vserver-1.11.13.ebuild 12918 MD5 61e88d37b9d7a2ab226edbbfe3b94180 baselayout-vserver-1.12.0_pre8-r2.ebuild 12599 MD5 b55bfb88b955107a0f0e6c5aaef21723 metadata.xml 162 -MD5 146c72b29984722318f811b008471e6c baselayout-vserver-1.11.13-r1.ebuild 13257 +MD5 63f20868c3d2988043352911ae17ee6a baselayout-vserver-1.11.13-r1.ebuild 13180 MD5 cd1ba3815d5592a3c65f185cc7585107 files/baselayout-vserver-1.12.0_pre8-init-timeout-fix.patch 339 MD5 645ee27aa823d5fb836b8f160326201e files/baselayout-vserver-1.12.0_pre8-whitelist-fixes.patch 1236 MD5 7c0cd50e4ac1dc062f5e6ab578e95659 files/copyright 2099 MD5 51a97031d54d767b45fb247d60727e9d files/fakelog.initd 449 MD5 76a9437d29bd77c416f76fbcf0cf2af2 files/vserver-changes 1642 -MD5 d7ecadaa032eb2c365b837c146b29f11 files/baselayout-vserver-1.11.13-init-timeout-fix.patch 471 +MD5 561934d6077d4acbbf74c8bd9191a357 files/baselayout-vserver-1.11.13-cleanup.patch 19193 MD5 a551ddae4bfb1b2bd7cbc16c57f481d3 files/digest-baselayout-vserver-1.11.13-r1 78 MD5 a551ddae4bfb1b2bd7cbc16c57f481d3 files/digest-baselayout-vserver-1.11.13 78 MD5 d1b600f26f783320972a6692720df0d3 files/digest-baselayout-vserver-1.12.0_pre8-r2 83 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) -iD8DBQFDOUtcmPFBzbX68WERAozvAKCWp+djwTyib4ZkWM+heISPo0I1iACgmLdU -/w5bt4a75JIitSYTpXV/qdE= -=2maY +iD8DBQFDPUYGmPFBzbX68WERAqSGAKCYZAZX/BL4B7O71tFfUQgLmVNaRACfQokw +mXQiRQ8Nm0IxCqYogQCgggU= +=86h2 -----END PGP SIGNATURE----- diff --git a/sys-apps/baselayout-vserver/baselayout-vserver-1.11.13-r1.ebuild b/sys-apps/baselayout-vserver/baselayout-vserver-1.11.13-r1.ebuild index 25152670d111..67c49b5f0774 100644 --- a/sys-apps/baselayout-vserver/baselayout-vserver-1.11.13-r1.ebuild +++ b/sys-apps/baselayout-vserver/baselayout-vserver-1.11.13-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout-vserver/baselayout-vserver-1.11.13-r1.ebuild,v 1.1 2005/09/27 13:36:23 hollow Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout-vserver/baselayout-vserver-1.11.13-r1.ebuild,v 1.2 2005/09/30 14:02:47 hollow Exp $ inherit flag-o-matic eutils toolchain-funcs multilib @@ -25,17 +25,16 @@ RDEPEND=">=sys-apps/sysvinit-2.84 >=sys-libs/readline-5.0-r1 >=app-shells/bash-3.0-r10 >=sys-apps/coreutils-5.2.1 - ) ) - !sys-apps/baselayout - !sys-apps/baselayout-lite" -DEPEND="virtual/os-headers" + ) )" +DEPEND="virtual/os-headers + >=sys-apps/portage-2.0.51" PROVIDE="virtual/baselayout" src_unpack() { unpack ${A} cd "${S}" - epatch ${FILESDIR}/${P}-init-timeout-fix.patch + epatch ${FILESDIR}/${P}-cleanup.patch } src_compile() { @@ -180,9 +179,9 @@ src_install() { # Ugly compatibility with stupid ebuilds and old profiles symlinks if [[ ${SYMLINK_LIB} == "yes" ]] ; then rm -r "${D}"/{lib,usr/lib,usr/local/lib} &> /dev/null - dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) /lib - dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) /usr/lib - dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) /usr/local/lib + ksym $(get_abi_LIBDIR ${DEFAULT_ABI}) /lib + ksym $(get_abi_LIBDIR ${DEFAULT_ABI}) /usr/lib + ksym $(get_abi_LIBDIR ${DEFAULT_ABI}) /usr/local/lib fi # FHS compatibility symlinks stuff @@ -201,16 +200,15 @@ src_install() { # attempting to merge files, (3) accidentally packaging up personal files # with quickpkg fperms 0600 /etc/shadow - mv "${D}"/etc/{passwd,shadow,group,hosts,issue.devfix} "${D}"/usr/share/baselayout + mv "${D}"/etc/{passwd,shadow,group,hosts} "${D}"/usr/share/baselayout insopts -m0755 insinto /etc/init.d doins ${S}/init.d/* - use fakelog && newins ${FILESDIR}/fakelog.initd fakelog # link dummy init scripts cd ${D}/etc/init.d - for i in checkfs checkroot clock consolefont localmount modules net netmount; do + for i in checkfs checkroot clock consolefont keymaps localmount modules net netmount numlock urandom; do ln -sf dummy $i done @@ -310,7 +308,7 @@ src_install() { # # Install baselayout utilities # - cd ${S}/src + cd "${S}"/src make DESTDIR="${D}" install || die # Normal baselayout generate devices in pkg_postinst(), but we keep @@ -349,16 +347,16 @@ pkg_postinst() { # Set up default runlevel symlinks # This used to be done in src_install but required knowledge of ${ROOT}, # which meant that it was effectively broken for binary installs. - if [[ -z $(/bin/ls ${ROOT}/etc/runlevels 2>/dev/null) ]]; then + if [[ -z $(/bin/ls "${ROOT}"/etc/runlevels 2>/dev/null) ]]; then for x in boot default; do einfo "Creating default runlevel symlinks for ${x}" - mkdir -p ${ROOT}/etc/runlevels/${x} - for y in $(<${ROOT}/usr/share/baselayout/rc-lists/${x}); do + mkdir -p "${ROOT}"/etc/runlevels/${x} + for y in $(<"${ROOT}"/usr/share/baselayout/rc-lists/${x}); do if [[ ! -e ${ROOT}/etc/init.d/${y} ]]; then ewarn "init.d/${y} not found -- ignoring" else - ln -sfn ${ROOT}/etc/init.d/${y} \ - ${ROOT}/etc/runlevels/${x}/${y} + ln -sfn /etc/init.d/${y} \ + "${ROOT}"/etc/runlevels/${x}/${y} fi done done diff --git a/sys-apps/baselayout-vserver/files/baselayout-vserver-1.11.13-cleanup.patch b/sys-apps/baselayout-vserver/files/baselayout-vserver-1.11.13-cleanup.patch new file mode 100644 index 000000000000..b85d4ea2e27e --- /dev/null +++ b/sys-apps/baselayout-vserver/files/baselayout-vserver-1.11.13-cleanup.patch @@ -0,0 +1,636 @@ +diff -NurpP rc-scripts-1.6.13-vserver/etc/conf.d/keymaps rc-scripts-1.6.13-vserver2/etc/conf.d/keymaps +--- rc-scripts-1.6.13-vserver/etc/conf.d/keymaps 2005-07-17 11:58:06.000000000 +0200 ++++ rc-scripts-1.6.13-vserver2/etc/conf.d/keymaps 1970-01-01 01:00:00.000000000 +0100 +@@ -1,26 +0,0 @@ +-# /etc/conf.d/keymaps +- +-# Use KEYMAP to specify the default console keymap. There is a complete tree +-# of keymaps in /usr/share/keymaps to choose from. +- +-KEYMAP="us" +- +- +-# Should we first load the 'windowkeys' console keymap? Most x86 users will +-# say "yes" here. Note that non-x86 users should leave it as "no". +- +-SET_WINDOWKEYS="no" +- +- +-# The maps to load for extended keyboards. Most users will leave this as is. +- +-EXTENDED_KEYMAPS="" +-#EXTENDED_KEYMAPS="backspace keypad euro" +- +- +-# Tell dumpkeys(1) to interpret character action codes to be +-# from the specified character set. +-# This only matters if you set UNICODE="yes" in /etc/rc.conf. +-# For a list of valid sets, run `dumpkeys --help` +- +-DUMPKEYS_CHARSET="" +diff -NurpP rc-scripts-1.6.13-vserver/etc/conf.d/rc rc-scripts-1.6.13-vserver2/etc/conf.d/rc +--- rc-scripts-1.6.13-vserver/etc/conf.d/rc 2005-07-17 11:58:06.000000000 +0200 ++++ rc-scripts-1.6.13-vserver2/etc/conf.d/rc 2005-09-30 15:04:56.949148250 +0200 +@@ -6,14 +6,6 @@ + RC_PARALLEL_STARTUP="no" + + +-# RC_USE_CONFIG_PROFILE allows you to have different /etc/conf.d files +-# based on your runlevel - if a conf.d file for your profile does not exist +-# then we try and use the default one. +-# To enable runlevel selection at boot, append "softlevel=foobar" to your +-# kernel line to change to the foobar runlevel. Or "rc foobar" at the command +-# prompt. +- +-RC_USE_CONFIG_PROFILE="yes" + + # + # Controlling start-stop-daemon behavior +@@ -45,6 +37,9 @@ RC_RETRY_COUNT=5 + RC_FAIL_ON_ZOMBIE="no" + + ++ ++ ++ + # + # Internal configuration variables + # +diff -NurpP rc-scripts-1.6.13-vserver/etc/inittab rc-scripts-1.6.13-vserver2/etc/inittab +--- rc-scripts-1.6.13-vserver/etc/inittab 2005-07-17 11:58:06.000000000 +0200 ++++ rc-scripts-1.6.13-vserver2/etc/inittab 2005-09-30 15:03:36.596126500 +0200 +@@ -21,3 +21,6 @@ l4:4:wait:/sbin/rc default + l5:5:wait:/sbin/rc default + l6:6:wait:/sbin/rc reboot + #z6:6:respawn:/sbin/sulogin ++ ++# What to do at the "Three Finger Salute". ++ca:12345:ctrlaltdel:/sbin/shutdown -r now +diff -NurpP rc-scripts-1.6.13-vserver/etc/issue rc-scripts-1.6.13-vserver2/etc/issue +--- rc-scripts-1.6.13-vserver/etc/issue 2005-06-10 19:20:42.000000000 +0200 ++++ rc-scripts-1.6.13-vserver2/etc/issue 1970-01-01 01:00:00.000000000 +0100 +@@ -1,3 +0,0 @@ +- +-This is \n.\O (\s \m \r) \t +- +diff -NurpP rc-scripts-1.6.13-vserver/etc/issue.devfix rc-scripts-1.6.13-vserver2/etc/issue.devfix +--- rc-scripts-1.6.13-vserver/etc/issue.devfix 2005-07-17 11:58:06.000000000 +0200 ++++ rc-scripts-1.6.13-vserver2/etc/issue.devfix 1970-01-01 01:00:00.000000000 +0100 +@@ -1,21 +0,0 @@ +------------------------------------------------------ +-Your system seems to be missing critical device files +-in /dev ! Although you may be running udev or devfs, +-the root partition is missing these required files ! +- +-To rectify this situation, please do the following: +-mkdir /mnt/fixit +-mount --bind / /mnt/fixit +-cp -a /dev/* /mnt/fixit/dev/ +-umount /mnt/fixit +-rmdir /mnt/fixit +- +-You may refer to these instructions at /etc/issue. +-If you previously had an issue file, it has been +-backed up at /etc/issue.devfix. Once you've fixed +-your system, you will have to restore your old issue +-file in order to get rid of this warning. +- +-Thanks for using Gentoo ! :) +-http://bugs.gentoo.org/show_bug.cgi?id=40987 +------------------------------------------------------ +diff -NurpP rc-scripts-1.6.13-vserver/etc/rc.conf rc-scripts-1.6.13-vserver2/etc/rc.conf +--- rc-scripts-1.6.13-vserver/etc/rc.conf 2005-07-17 11:58:06.000000000 +0200 ++++ rc-scripts-1.6.13-vserver2/etc/rc.conf 2005-09-30 15:03:52.221103000 +0200 +@@ -1,11 +1,5 @@ + # /etc/rc.conf: Global startup script configuration settings + +-# UNICODE specifies whether you want to have UNICODE support in the console. +-# If you set to yes, please make sure to set a UNICODE aware CONSOLEFONT and +-# KEYMAP in the /etc/conf.d/consolefont and /etc/conf.d/keymaps config files. +- +-UNICODE="no" +- + # Set EDITOR to your preferred editor. + # You may use something other than what is listed here. + +diff -NurpP rc-scripts-1.6.13-vserver/init.d/bootmisc rc-scripts-1.6.13-vserver2/init.d/bootmisc +--- rc-scripts-1.6.13-vserver/init.d/bootmisc 2005-07-17 11:58:06.000000000 +0200 ++++ rc-scripts-1.6.13-vserver2/init.d/bootmisc 2005-09-30 15:35:07.526302250 +0200 +@@ -19,13 +19,7 @@ start() { + cp /etc/nologin /etc/nologin.boot &> /dev/null + fi + +- if [[ -e /etc/sysctl.conf ]] ; then +- ebegin "Configuring kernel parameters" +- /sbin/sysctl -q -p /etc/sysctl.conf +- eend 0 +- fi +- +- if [[ -z ${CDBOOT} ]] && ! touch /var/run/.keep 2> /dev/null ; then ++ if ! touch /var/run/.keep 2> /dev/null ; then + ewarn "Skipping /var and /tmp initialization (ro root?)" + return 0 + fi +@@ -43,31 +37,23 @@ start() { + ebegin "Cleaning /var/lock, /var/run" + rm -rf /var/run/console.lock /var/run/console/* + +- if [[ -z ${CDBOOT} ]] ; then +- # +- # Clean up any stale locks. +- # +- find /var/lock -type f -print0 | xargs -0 rm -f -- +- # +- # Clean up /var/run and create /var/run/utmp so that we can login. +- # +- for x in $(find /var/run/ ! -type d ! -name utmp ! -name innd.pid ! -name random-seed) ; do +- local daemon=${x##*/} +- daemon=${daemon%*.pid} +- # Do not remove pidfiles of already running daemons +- if [[ -z $(ps --no-heading -C "${daemon}") ]] ; then +- if [[ -f ${x} || -L ${x} ]] ; then +- rm -f "${x}" +- fi ++ # ++ # Clean up any stale locks. ++ # ++ find /var/lock -type f -print0 | xargs -0 rm -f -- ++ # ++ # Clean up /var/run and create /var/run/utmp so that we can login. ++ # ++ for x in $(find /var/run/ ! -type d ! -name utmp ! -name innd.pid ! -name random-seed) ; do ++ local daemon=${x##*/} ++ daemon=${daemon%*.pid} ++ # Do not remove pidfiles of already running daemons ++ if [[ -z $(ps --no-heading -C "${daemon}") ]] ; then ++ if [[ -f ${x} || -L ${x} ]] ; then ++ rm -f "${x}" + fi +- done +- fi +- +- # Reset pam_console permissions if we are actually using it +- if [[ -x /sbin/pam_console_apply && ! -c /dev/.devfsd && \ +- -n $(grep -v -e '^[[:space:]]*#' /etc/pam.d/* | grep 'pam_console') ]] ; then +- /sbin/pam_console_apply -r +- fi ++ fi ++ done + + # Create the .keep to stop portage from removing /var/lock + > /var/lock/.keep +@@ -76,7 +62,7 @@ start() { + # + # Clean up /tmp directory + # +- if [[ -z ${CDBOOT} ]] && [[ -d /tmp ]] ; then ++ if [[ -d /tmp ]] ; then + cd /tmp + if [[ ${WIPE_TMP} == "yes" ]] ; then + ebegin "Wiping /tmp directory" +@@ -120,4 +106,5 @@ start() { + [[ -f /etc/resolv.conf ]] || touch /etc/resolv.conf &> /dev/null + } + ++ + # vim:ts=4 +diff -NurpP rc-scripts-1.6.13-vserver/init.d/dummy rc-scripts-1.6.13-vserver2/init.d/dummy +--- rc-scripts-1.6.13-vserver/init.d/dummy 2005-06-11 15:11:23.000000000 +0200 ++++ rc-scripts-1.6.13-vserver2/init.d/dummy 2005-09-03 20:13:45.000000000 +0200 +@@ -1,14 +1,13 @@ + #!/sbin/runscript + # Copyright 1999-2005 Gentoo Foundation + # Distributed under the terms of the GNU General Public License v2 +-# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout-vserver/files/baselayout-vserver-1.11.13-cleanup.patch,v 1.1 2005/09/30 14:02:47 hollow Exp $ + + start() { +- return 0 ++ return 0 + } + + stop() { +- return 0 ++ return 0 + } + + # vim:ts=4 +diff -NurpP rc-scripts-1.6.13-vserver/init.d/halt.sh rc-scripts-1.6.13-vserver2/init.d/halt.sh +--- rc-scripts-1.6.13-vserver/init.d/halt.sh 1970-01-01 01:00:00.000000000 +0100 ++++ rc-scripts-1.6.13-vserver2/init.d/halt.sh 2005-09-30 15:06:54.672505500 +0200 +@@ -0,0 +1,8 @@ ++# Copyright 1999-2005 Gentoo Foundation ++# Distributed under the terms of the GNU General Public License v2 ++ ++# Write a reboot record to /var/log/wtmp before unmounting ++ ++halt -w &>/dev/null ++ ++# vim:ts=4 +diff -NurpP rc-scripts-1.6.13-vserver/init.d/reboot.sh rc-scripts-1.6.13-vserver2/init.d/reboot.sh +--- rc-scripts-1.6.13-vserver/init.d/reboot.sh 1970-01-01 01:00:00.000000000 +0100 ++++ rc-scripts-1.6.13-vserver2/init.d/reboot.sh 2005-09-30 15:07:24.242353500 +0200 +@@ -0,0 +1,8 @@ ++# Copyright 1999-2005 Gentoo Foundation ++# Distributed under the terms of the GNU General Public License v2 ++ ++/sbin/reboot -d ++ ++# hmm, if the above failed, that's kind of odd ... ++# so let's force a reboot ++/sbin/reboot -f +diff -NurpP rc-scripts-1.6.13-vserver/init.d/shutdown.sh rc-scripts-1.6.13-vserver2/init.d/shutdown.sh +--- rc-scripts-1.6.13-vserver/init.d/shutdown.sh 1970-01-01 01:00:00.000000000 +0100 ++++ rc-scripts-1.6.13-vserver2/init.d/shutdown.sh 2005-09-30 15:07:36.583124750 +0200 +@@ -0,0 +1,8 @@ ++# Copyright 1999-2005 Gentoo Foundation ++# Distributed under the terms of the GNU General Public License v2 ++ ++/sbin/halt -d ++ ++# hmm, if the above failed, that's kind of odd ... ++# so let's force a halt ++/sbin/halt -f +diff -NurpP rc-scripts-1.6.13-vserver/rc-lists/boot rc-scripts-1.6.13-vserver2/rc-lists/boot +--- rc-scripts-1.6.13-vserver/rc-lists/boot 2005-06-10 19:42:22.000000000 +0200 ++++ rc-scripts-1.6.13-vserver2/rc-lists/boot 2005-09-30 15:08:00.340609500 +0200 +@@ -1,5 +1,4 @@ + bootmisc +-keymaps + rmnologin + domainname + hostname +diff -NurpP rc-scripts-1.6.13-vserver/sbin/functions.sh rc-scripts-1.6.13-vserver2/sbin/functions.sh +--- rc-scripts-1.6.13-vserver/sbin/functions.sh 2005-07-17 11:58:06.000000000 +0200 ++++ rc-scripts-1.6.13-vserver2/sbin/functions.sh 2005-09-30 15:37:35.927576750 +0200 +@@ -33,7 +33,6 @@ RC_ENDCOL="yes" + # Default values for rc system + # + RC_PARALLEL_STARTUP="no" +-RC_USE_CONFIG_PROFILE="yes" + + # + # Default values for e-message indentation and dots +@@ -59,13 +58,29 @@ import_addon() { + return 1 + } + ++# void splash(...) ++# ++# Notify bootsplash/splashutils/gensplash/whatever about ++# important events. ++# ++splash() { ++ return 0 ++} ++ ++# void profiling(...) ++# ++# Notify bootsplash/whatever about important events. ++# ++profiling() { ++ return 0 ++} ++ + # void bootlog(...) + # + # Notify bootlogger about important events. + bootlog() { + return 0 + } +-import_addon bootlogger.sh + + # void get_bootconfig() + # +@@ -74,35 +89,13 @@ import_addon bootlogger.sh + # parameters. + # + get_bootconfig() { +- local copt= +- local newbootlevel= +- local newsoftlevel= +- +- if [[ -n ${newbootlevel} ]] ; then +- export BOOTLEVEL=${newbootlevel} +- else +- export BOOTLEVEL="boot" +- fi +- +- if [[ -n ${newsoftlevel} ]] ; then +- export DEFAULTLEVEL=${newsoftlevel} +- else +- export DEFAULTLEVEL="default" +- fi +- +- return 0 ++ export BOOTLEVEL="boot" ++ export DEFAULTLEVEL="default" + } + + setup_defaultlevels() { + get_bootconfig + +- if [ "${RC_USE_CONFIG_PROFILE}" = "yes" -a -n "${DEFAULTLEVEL}" ] && \ +- [ -d "/etc/runlevels/${BOOTLEVEL}.${DEFAULTLEVEL}" -o \ +- -L "/etc/runlevels/${BOOTLEVEL}.${DEFAULTLEVEL}" ] +- then +- export BOOTLEVEL="${BOOTLEVEL}.${DEFAULTLEVEL}" +- fi +- + if [ -z "${SOFTLEVEL}" ] ; then + if [ -f "${svcdir}/softlevel" ] ; then + export SOFTLEVEL="$(< ${svcdir}/softlevel)" +@@ -414,6 +407,16 @@ get_KV() { + return $? + } + ++# bool get_bootparam(param) ++# ++# return 0 if gentoo=param was passed to the kernel ++# ++# EXAMPLE: if get_bootparam "nodevfs" ; then .... ++# ++get_bootparam() { ++ return 1 ++} ++ + # Safer way to list the contents of a directory, + # as it do not have the "empty dir bug". + # +@@ -495,13 +498,7 @@ get_options() { + # Returns a config file name with the softlevel suffix + # appended to it. For use with multi-config services. + add_suffix() { +- if [ "${RC_USE_CONFIG_PROFILE}" = "yes" -a -e "$1.${DEFAULTLEVEL}" ] +- then +- echo "$1.${DEFAULTLEVEL}" +- else +- echo "$1" +- fi +- ++ echo "$1" + return 0 + } + +@@ -515,6 +512,76 @@ get_base_ver() { + echo ${ver##* } + } + ++# Network filesystems list for common use in rc-scripts. ++# This variable is used in is_net_fs and other places such as ++# localmount. ++NET_FS_LIST="afs cifs coda davfs gfs ncpfs nfs nfs4 shfs smbfs" ++ ++# bool is_net_fs(path) ++# ++# return 0 if path is the mountpoint of a networked filesystem ++# ++# EXAMPLE: if is_net_fs / ; then ... ++# ++is_net_fs() { ++ local fstype ++ # /proc/mounts is always accurate but may not always be available ++ if [[ -e /proc/mounts ]]; then ++ fstype=$( sed -n -e '/^rootfs/!s:.* '"$1"' \([^ ]*\).*:\1:p' /proc/mounts ) ++ else ++ fstype=$( mount | sed -n -e 's:.* on '"$1"' type \([^ ]*\).*:\1:p' ) ++ fi ++ [[ " ${NET_FS_LIST} " == *" ${fstype} "* ]] ++ return $? ++} ++ ++# bool is_uml_sys() ++# ++# return 0 if the currently running system is User Mode Linux ++# ++# EXAMPLE: if is_uml_sys ; then ... ++# ++is_uml_sys() { ++ grep -qs 'UML' /proc/cpuinfo ++ return $? ++} ++ ++# bool is_vserver_sys() ++# ++# return 0 if the currently running system is a Linux VServer ++# ++# EXAMPLE: if is_vserver_sys ; then ... ++# ++is_vserver_sys() { ++ grep -qs '^s_context:[[:space:]]*[1-9]' /proc/self/status ++ return $? ++} ++ ++# bool is_xenU_sys() ++# ++# return 0 if the currently running system is an unprivileged Xen domain ++# ++# EXAMPLE: if is_xenU_sys ; then ... ++# ++is_xenU_sys() { ++ [[ -d /proc/xen && ! -f /proc/xen/privcmd ]] ++} ++ ++# bool get_mount_fstab(path) ++# ++# return the parameters to pass to the mount command generated from fstab ++# ++# EXAMPLE: cmd=$( get_mount_fstab /proc ) ++# cmd=${cmd:--t proc none /proc} ++# mount -n ${cmd} ++# ++get_mount_fstab() { ++ awk '$1 ~ "^#" { next } ++ $2 == "'$*'" { if (found++ == 0) { print "-t "$3,"-o "$4,$1,$2 } } ++ END { if (found > 1) { print "More than one entry for '$*' found in /etc/fstab!" > "/dev/stderr" } } ++ ' /etc/fstab ++} ++ + # char *reverse_list(list) + # + # Returns the reversed order of list +@@ -525,6 +592,26 @@ reverse_list() { + done + } + ++# void start_addon(addon) ++# ++# Starts addon. ++# ++start_addon() { ++ local addon=$1 ++ (import_addon ${addon}-start.sh) ++ return 0 ++} ++ ++# void stop_addon(addon) ++# ++# Stops addon. ++# ++stop_addon() { ++ local addon=$1 ++ (import_addon ${addon}-stop.sh) ++ return 0 ++} ++ + # bool is_older_than(reference, files/dirs to check) + # + # return 0 if any of the files/dirs are newer than +@@ -577,9 +664,6 @@ if [ -z "${EBUILD}" ] ; then + esac + done + +- if [ -r "/proc/cmdline" ] ; then +- setup_defaultlevels +- fi + else + # Should we use colors ? + if [[ $* != *depend* ]]; then +diff -NurpP rc-scripts-1.6.13-vserver/sbin/rc rc-scripts-1.6.13-vserver2/sbin/rc +--- rc-scripts-1.6.13-vserver/sbin/rc 2005-07-17 13:09:03.000000000 +0200 ++++ rc-scripts-1.6.13-vserver2/sbin/rc 2005-09-30 15:38:29.358916000 +0200 +@@ -15,7 +15,15 @@ check_statedir() { + if ! mkdir -p "$1" &>/dev/null ; then + echo + eerror "For Gentoo to function properly, \"$1\" needs to exist." +- /sbin/sulogin ${CONSOLE} ++ if [[ ${RC_FORCE_AUTO} == "yes" ]] ; then ++ eerror "Attempting to create \"$1\" for you ..." ++ mkdir -p "$1" ++ else ++ eerror "Please mount your root partition read/write, and execute:" ++ echo ++ eerror " # mkdir -p $1" ++ echo; echo ++ fi + einfo "Rebooting" + /sbin/reboot -f + fi +@@ -35,7 +43,7 @@ get_critical_services() { + CRITICAL_SERVICES="${CRITICAL_SERVICES} ${x##*/}" + done + else +- CRITICAL_SERVICES="" ++ CRITICAL_SERVICES="hostname" + fi + + export CRITICAL_SERVICES +@@ -54,10 +62,6 @@ then + # Setup initial $PATH just in case + PATH="/bin:/sbin:/usr/bin:/usr/sbin:${PATH}" + +- # Help users recover their systems incase these go missing +- [ -c /dev/null ] && dev_null=1 || dev_null=0 +- [ -c /dev/console ] && dev_console=1 || dev_console=0 +- + echo + echo -e "${GOOD}Gentoo Linux${GENTOO_VERS}; ${BRACKET}http://www.gentoo.org/${NORMAL}" + echo -e " Copyright 1999-2005 Gentoo Foundation; Distributed under the GPLv2" +@@ -66,11 +70,6 @@ then + check_statedir /proc + check_statedir /dev + +- # We set the forced softlevel from the kernel command line +- # It needs to be run right after proc is mounted for the +- # boot runlevel +- setup_defaultlevels +- + # $BOOT can be used by rc-scripts to test if it is the first time + # the 'boot' runlevel is executed. Now also needed by some stuff in + # the 'sysinit' runlevel ... +@@ -109,17 +108,11 @@ then + then + echo + eerror "One of more critical startup scripts failed to start!" +- eerror "Please correct this, and reboot ..." +- echo; echo +- /sbin/sulogin ${CONSOLE} + einfo "Rebooting" + /sbin/reboot -f + fi + done + +- # /var/log should be writable now, so starting saving the boot output +- bootlog sync +- + # Check that $svcdir exists ... + check_statedir "${svcdir}" + +@@ -143,20 +136,6 @@ then + done + ) + +- # If the user's /dev/null or /dev/console are missing, we +- # should help them out and explain how to rectify the situation +- if [ ${dev_null} -eq 0 -o ${dev_console} -eq 0 ] \ +- && [ -e /usr/share/baselayout/issue.devfix ] +- then +- # Backup current /etc/issue +- if [ -e /etc/issue -a ! -e /etc/issue.devfix ] +- then +- mv /etc/issue /etc/issue.devfix +- fi +- +- cp /usr/share/baselayout/issue.devfix /etc/issue +- fi +- + # Setup login records ... this has to be done here because when + # we exit this runlevel, init will write a boot record to utmp + # If /var/run is readonly, then print a warning, not errors +@@ -172,16 +151,11 @@ then + ewarn "Skipping /var/run/utmp initialization (ro root?)" + fi + +- # All done logging +- bootlog quit +- + exit 0 + fi # Sysinit ends here + + if [ "${RUNLEVEL}" = "S" -a "${argv1}" = "boot" ] + then +- setup_defaultlevels +- + if [ -n "${DEFAULTLEVEL}" -a "${DEFAULTLEVEL}" != "default" ] + then + # Setup our default runlevel runlevel that will be run +@@ -390,12 +364,14 @@ if [[ ${SOFTLEVEL} == "reboot" || ${SOFT + rm -rf $(ls -d1 "${svcdir}/"* 2>/dev/null | \ + grep -ve '\(depcache\|deptree\|envcache\)') + +- # Reset pam_console permissions if we are actually using it +- if [[ -x /sbin/pam_console_apply && ! -c /dev/.devfsd && \ +- -n $(grep -v -e '^[[:space:]]*#' /etc/pam.d/* | grep 'pam_console') ]]; then +- /sbin/pam_console_apply -r ++ source /etc/init.d/halt.sh ++ ++ if [[ ${SOFTLEVEL} == "reboot" ]] ; then ++ source /etc/init.d/reboot.sh ++ else ++ source /etc/init.d/shutdown.sh + fi +- ++ + # Should never get here + exit 0 + fi +@@ -452,7 +428,4 @@ rm -rf "${svcdir}/failed" &>/dev/null + # If we were in the boot runlevel, it is done now ... + [ -n "${BOOT}" ] && unset BOOT + +-# util-vserver is failing if there is no `true` here +-true +- + # vim:ts=4 +diff -NurpP rc-scripts-1.6.13-vserver/sbin/runscript.sh rc-scripts-1.6.13-vserver2/sbin/runscript.sh +--- rc-scripts-1.6.13-vserver/sbin/runscript.sh 2005-07-17 11:58:06.000000000 +0200 ++++ rc-scripts-1.6.13-vserver2/sbin/runscript.sh 2005-09-30 15:32:20.511864500 +0200 +@@ -35,8 +35,7 @@ mylevel=$(<"${svcdir}/softlevel") + # Source configuration files. + # (1) Source /etc/conf.d/${myservice} to get initscript-specific + # configuration (if it exists). +-# (2) Source /etc/conf.d/net if it is a net.* service +-# (3) Source /etc/rc.conf to pick up potentially overriding ++# (2) Source /etc/rc.conf to pick up potentially overriding + # configuration, if the system administrator chose to put it + # there (if it exists). + diff --git a/sys-apps/baselayout-vserver/files/baselayout-vserver-1.11.13-init-timeout-fix.patch b/sys-apps/baselayout-vserver/files/baselayout-vserver-1.11.13-init-timeout-fix.patch deleted file mode 100644 index 90678a98aa02..000000000000 --- a/sys-apps/baselayout-vserver/files/baselayout-vserver-1.11.13-init-timeout-fix.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff -Nrup rc-scripts-1.6.13-vserver.orig/etc/inittab rc-scripts-1.6.13-vserver/etc/inittab ---- rc-scripts-1.6.13-vserver.orig/etc/inittab 2005-07-17 11:58:06.000000000 +0200 -+++ rc-scripts-1.6.13-vserver/etc/inittab 2005-09-27 07:35:39.000000000 +0200 -@@ -21,3 +21,6 @@ l4:4:wait:/sbin/rc default - l5:5:wait:/sbin/rc default - l6:6:wait:/sbin/rc reboot - #z6:6:respawn:/sbin/sulogin -+ -+# What to do at the "Three Finger Salute". -+ca:12345:ctrlaltdel:/sbin/shutdown -r now |