diff options
author | Benedikt Boehm <hollow@gentoo.org> | 2005-12-03 17:27:06 +0000 |
---|---|---|
committer | Benedikt Boehm <hollow@gentoo.org> | 2005-12-03 17:27:06 +0000 |
commit | d8aaaeff5598a397570d8c36119a5f9730922770 (patch) | |
tree | c218deaebda445dc52d11a1a6a10cc98b2ae9e34 | |
parent | remove initstyle hack (diff) | |
download | baselayout-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-x | sbin/rc | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -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 |