summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Boehm <hollow@gentoo.org>2005-09-03 18:38:57 +0000
committerBenedikt Boehm <hollow@gentoo.org>2005-09-03 18:38:57 +0000
commitb52af3103b403ec40c053bf6d93fc4f23e40919c (patch)
tree61bb1ad0a637e18510cf8d4e5ddbf990b943a3d7
parentlink dummy script to satisfy deps from other init scripts (diff)
downloadbaselayout-vserver-b52af3103b403ec40c053bf6d93fc4f23e40919c.tar.gz
baselayout-vserver-b52af3103b403ec40c053bf6d93fc4f23e40919c.tar.bz2
baselayout-vserver-b52af3103b403ec40c053bf6d93fc4f23e40919c.zip
cleanup bootmisc
svn path=/baselayout-vserver/trunk/; revision=22
-rwxr-xr-xinit.d/bootmisc57
1 files changed, 18 insertions, 39 deletions
diff --git a/init.d/bootmisc b/init.d/bootmisc
index 1f84e9d..ee12ca6 100755
--- a/init.d/bootmisc
+++ b/init.d/bootmisc
@@ -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"
@@ -108,13 +94,6 @@ start() {
eend 0
fi
- (
- # Make sure our X11 stuff have the correct permissions
- mkdir -p /tmp/.{ICE,X11}-unix
- chown 0:0 /tmp/.{ICE,X11}-unix
- chmod 1777 /tmp/.{ICE,X11}-unix
- [[ -x /sbin/restorecon ]] && restorecon /tmp/.{ICE,X11}-unix
- ) &> /dev/null
fi
#