diff options
author | Christian Heim <phreak@gentoo.org> | 2006-05-25 10:09:00 +0000 |
---|---|---|
committer | Christian Heim <phreak@gentoo.org> | 2006-05-25 10:09:00 +0000 |
commit | 343e5f0438614b51fbad79c4fb4971aae92fc8f4 (patch) | |
tree | 6ecf80c797911a111d76c250846d8cb481e5579f | |
parent | This is finally baselayout-vserver-1.12.0 (diff) | |
download | baselayout-vserver-343e5f0438614b51fbad79c4fb4971aae92fc8f4.tar.gz baselayout-vserver-343e5f0438614b51fbad79c4fb4971aae92fc8f4.tar.bz2 baselayout-vserver-343e5f0438614b51fbad79c4fb4971aae92fc8f4.zip |
Merging r2046
svn path=/baselayout-vserver/branches/baselayout-1_12/; revision=365
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | ChangeLog.vserver | 4 | ||||
-rwxr-xr-x | init.d/halt.sh | 6 | ||||
-rwxr-xr-x | net-scripts/init.d/net.lo | 10 | ||||
-rw-r--r-- | sbin/functions.sh | 11 | ||||
-rwxr-xr-x | sbin/rc | 10 |
6 files changed, 45 insertions, 8 deletions
@@ -1,6 +1,18 @@ # ChangeLog for Gentoo System Intialization ("rc") scripts # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPLv2 + 24 May 2006; Roy Marples <uberlord@gentoo.org>: + + Ensure that we call halt.sh in a new shell with LC_ALL=C so that we don't + load any locale information which may stop us unmounting /usr, #128848 + and #133090. + + Don't set clock for OpenVZ systems, #133265 thanks to Kir Kolyshkin. + + Don't remount / in checkroot for unionfs /, #129975 thanks to Daniel. + + Don't stop net interfaces / is unionfs and a branch is network mounted. + * baselayout-1.12.0 (23 May 2006) 23 May 2006; Roy Marples <uberlord@gentoo.org>: diff --git a/ChangeLog.vserver b/ChangeLog.vserver index 431122f..3e28fea 100644 --- a/ChangeLog.vserver +++ b/ChangeLog.vserver @@ -1,6 +1,10 @@ # ChangeLog for Gentoo System Intialization ("rc") scripts # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPLv2 + 25 May 2006; Christian Heim <phreak@gentoo.org>: + Merging latest changes to the baselayout-1_12 branch. This merge is based + upon revision 2046. + 24 May 2006; Christian Heim <phreak@gentoo.org>: Merging latest changes to the baselayout-1_12 branch. This merge is based upon revision 2045. diff --git a/init.d/halt.sh b/init.d/halt.sh index 117fc6f..b54828c 100755 --- a/init.d/halt.sh +++ b/init.d/halt.sh @@ -1,8 +1,14 @@ +#!/bin/bash # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 +[[ ${RC_GOT_FUNCTIONS} != "yes" ]] && source /sbin/functions.sh + # Write a reboot record to /var/log/wtmp before unmounting halt -w &>/dev/null +# Load the final script depending on how we are called +[[ -e /etc/init.d/"$1".sh ]] && source /etc/init.d/"$1".sh + # vim:ts=4 diff --git a/net-scripts/init.d/net.lo b/net-scripts/init.d/net.lo index ed46320..e5e4990 100755 --- a/net-scripts/init.d/net.lo +++ b/net-scripts/init.d/net.lo @@ -976,9 +976,17 @@ run_stop() { ( predown "${iface}" ) eend $? "predown ${iface} failed" || return 1 eoutdent - elif is_net_fs /; then + elif is_net_fs / ; then eerror "root filesystem is network mounted -- can't stop ${iface}" return 1 + elif is_union_fs / ; then + for x in $(unionctl "${dir}" --list \ + | sed -e 's/^\(.*\) .*/\1/') ; do + if is_net_fs "${x}" ; then + eerror "Part of the root filesystem is network mounted - cannot stop ${iface}" + return 1 + fi + done fi iface_stop "${iface}" || return 1 # always succeeds, btw diff --git a/sbin/functions.sh b/sbin/functions.sh index 34e00ad..7af6843 100644 --- a/sbin/functions.sh +++ b/sbin/functions.sh @@ -502,6 +502,17 @@ is_net_fs() { return $? } +# bool is_net_fs(path) +# +# return 0 if path is under unionfs control +# +# EXAMPLE: if is_union_fs / ; then ... +# +is_union_fs() { + [[ ! -x /sbin/unionctl ]] && return 1 + unionctl "$1" --list &>/dev/null +} + # bool is_uml_sys() # # return 0 if the currently running system is User Mode Linux @@ -410,14 +410,10 @@ if [[ ${SOFTLEVEL} == "reboot" || ${SOFTLEVEL} == "shutdown" ]] ; then rm -rf $(ls -d1 "${svcdir}/"* 2>/dev/null | \ grep -ve '\(depcache\|deptree\|envcache\)') - source /etc/init.d/halt.sh + # Call halt.sh with LC_ALL=C so that bash doesn't load any locales + # which could interfere with unmounting /usr + LC_ALL=C exec /etc/init.d/halt.sh "${SOFTLEVEL}" - 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 |