summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Boehm <hollow@gentoo.org>2005-12-03 17:27:06 +0000
committerBenedikt Boehm <hollow@gentoo.org>2005-12-03 17:27:06 +0000
commitd8aaaeff5598a397570d8c36119a5f9730922770 (patch)
treec218deaebda445dc52d11a1a6a10cc98b2ae9e34
parentremove initstyle hack (diff)
downloadbaselayout-vserver-d8aaaeff5598a397570d8c36119a5f9730922770.tar.gz
baselayout-vserver-d8aaaeff5598a397570d8c36119a5f9730922770.tar.bz2
baselayout-vserver-d8aaaeff5598a397570d8c36119a5f9730922770.zip
fix openvz /proc handling; cleanup
svn path=/baselayout-vserver/branches/baselayout-1_12/; revision=154
-rwxr-xr-xsbin/rc16
1 files changed, 9 insertions, 7 deletions
diff --git a/sbin/rc b/sbin/rc
index d766d2a..1222ae8 100755
--- a/sbin/rc
+++ b/sbin/rc
@@ -57,7 +57,11 @@ then
check_statedir /proc
check_statedir /dev
- check_statedir "${svcdir}"
+
+ # OpenVZ needs to mount proc from inside
+ if [[ ! -e /proc/self ]]; then
+ mount -t proc none /proc
+ fi
# We set the forced softlevel from the kernel command line
# It needs to be run right after proc is mounted for the
@@ -108,6 +112,10 @@ then
fi
done
+ # Check that $svcdir exists ...
+ check_statedir "${svcdir}"
+
+
# Clear $svcdir from stale entries, but leave the caches around, as it
# should help speed things up a bit
rm -rf $(ls -d1 "${svcdir}/"* 2>/dev/null | \
@@ -355,12 +363,6 @@ if [[ ${SOFTLEVEL} == "reboot" || ${SOFTLEVEL} == "shutdown" ]] ; then
source /etc/init.d/halt.sh
- # we just die here since we have no init
- # and we should be the last running process
- if [[ ${RC_INITSTYLE_HACK} == "yes" ]] ; then
- exit 0
- fi
-
if [[ ${SOFTLEVEL} == "reboot" ]] ; then
source /etc/init.d/reboot.sh
else