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
commit3ec1a79e115a778858fdadfbba25161f2b696741 (patch)
treef82109ea7bb6c414fcddaca29fb827261cd7a65d
parentimport tarball.sh script (diff)
downloadbaselayout-vserver-3ec1a79e115a778858fdadfbba25161f2b696741.tar.gz
baselayout-vserver-3ec1a79e115a778858fdadfbba25161f2b696741.tar.bz2
baselayout-vserver-3ec1a79e115a778858fdadfbba25161f2b696741.zip
fix openvz /proc handling; cleanup
svn path=/baselayout-vserver/trunk/; revision=154
-rwxr-xr-xsbin/init.linux.sh10
-rwxr-xr-xsbin/rc21
2 files changed, 8 insertions, 23 deletions
diff --git a/sbin/init.linux.sh b/sbin/init.linux.sh
index 6c14765..d144d84 100755
--- a/sbin/init.linux.sh
+++ b/sbin/init.linux.sh
@@ -21,13 +21,13 @@ echo -e "Press ${GOOD}I${NORMAL} to enter interactive boot mode"
echo
check_statedir /proc
+check_statedir /dev
-# openvz workaround
-# /proc/self exists: we're on linux-vserver
-# /proc/self doesn't exist: we're on openvz
-[[ -e /proc/self ]] || "${svclib}"/ovz-mount-proc
+# OpenVZ needs to mount proc from inside
+if [[ ! -e /proc/self ]]; then
+ mount -t proc none /proc
+fi
-check_statedir /dev
source "${svclib}"/sh/init-common-post.sh
diff --git a/sbin/rc b/sbin/rc
index a0ba96a..6471ace 100755
--- a/sbin/rc
+++ b/sbin/rc
@@ -30,20 +30,17 @@ get_critical_services() {
# Save $1
argv1=$1
-# we need this to prevent a warning below
-[[ ! -e ${svcdir}/softlevel ]] && touch ${svcdir}/softlevel
-
# First time boot stuff goes here. Note that 'sysinit' is an internal runlevel
# used to bring up local filesystems, and should not be started with /sbin/rc
# directly ...
-if [[ ${argv1} = "sysinit" || ( ${argv1} = "boot" && "$(<${svcdir}/softlevel)" != "sysinit" ) ]]
+if [[ ${argv1} = "sysinit" ]]
then
source "${svclib}"/sh/init.sh || {
echo "Could not source init.sh !?"
exit 1
}
- [[ ${argv1} = "boot" ]] || exit 0
+ exit 0
fi # Sysinit ends here
if [[ ${argv1} == "boot" ]]
@@ -244,12 +241,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
@@ -300,13 +291,7 @@ rm -rf "${svcdir}/softscripts.old" &>/dev/null
rm -rf "${svcdir}/failed" &>/dev/null
# If we were in the boot runlevel, it is done now ...
-if [[ -n ${BOOT} ]] ; then
- unset BOOT
-
- if [[ "${RC_INITSTYLE_HACK}" = "yes" ]]; then
- /sbin/rc default
- fi
-fi
+[[ -n ${BOOT} ]] && unset BOOT
# Remove the cached CONSOLETYPE
unset CONSOLETYPE