View previous topic :: View next topic |
Author |
Message |
Freanan Tux's lil' helper
Joined: 14 Feb 2005 Posts: 113 Location: Esthal, Pfalz, Germany
|
Posted: Sun Aug 28, 2005 8:09 am Post subject: bootmisc does not have a starting function |
|
|
I just did etc-update (once again).
This time i actually took lots of care not to replace any config file that i had had to edit before to make things work.
Still an importand file (/etc/init.d/bootmisc) must have got broken.
I have no clue what it looked like before, but now it consists only of some comment on top and during bootup i get error messages that bootmisc has no start function and that alsasound was not started.
Since the file was empty anyway i tried to fix it copying an old bootmisc file from my old knoppix system over the empty file, but this only increased the count of error messages.
Please help me out of this or give me a standard-bootmisc file (since mine should be the standard version, as i never edited this file before). |
|
Back to top |
|
|
buto Apprentice
Joined: 22 Sep 2003 Posts: 155
|
Posted: Sun Aug 28, 2005 11:53 am Post subject: |
|
|
One way could be to re-emerge baselayout, as this script belongs to this package:
Code: | trauma olivier # equery b /etc/init.d/bootmisc
[ Searching for file(s) /etc/init.d/bootmisc in *... ]
sys-apps/baselayout-1.11.13-r1 (/etc/init.d/bootmisc) |
then a new /etc/init.d/bootmisc should be available via etc-update
In case you'd rather not, here is mine :
Code: | #!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend() {
use clock hostname
need localmount
before logger
}
start() {
[[ ${BOOT} != "yes" ]] && return 0
#
# Put a nologin file in /etc to prevent people from logging in before
# system startup is complete.
#
if [[ ${DELAYLOGIN} == "yes" ]] ; then
echo "System bootup in progress - please wait" > /etc/nologin
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
ewarn "Skipping /var and /tmp initialization (ro root?)"
return 0
fi
if [[ -x /sbin/env-update.sh ]] ; then
ebegin "Updating environment"
/sbin/env-update.sh -u > /dev/null
eend 0
fi
#
# Take care of random stuff [ /var/lock | /var/run | pam ]
#
if [[ -d /var/lib/net-scripts/state ]] ; then
ebegin "Cleaning /var/lib/net-scripts/state"
rm -rf /var/lib/net-scripts/state/*
eend 0
fi
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
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
# Create the .keep to stop portage from removing /var/lock
> /var/lock/.keep
eend 0
#
# Clean up /tmp directory
#
if [[ -z ${CDBOOT} ]] && [[ -d /tmp ]] ; then
cd /tmp
if [[ ${WIPE_TMP} == "yes" ]] ; then
ebegin "Wiping /tmp directory"
# This eval stuff sucks, so if someone has a better *working*
# solution, please file a bug at http://bugs.gentoo.org/
# Originally ripped from Debian init scripts
local exceptions="
'!' -name . -a
'!' '(' -uid 0 -a
'('
-path './lost+found/*' -o
-path './quota.user/*' -o
-path './aquota.user/*' -o
-path './quota.group/*' -o
-path './aquota.group/*' -o
-path './.journal/*'
')'
')'"
# First kill most files, then kill empty dirs
eval find . -xdev -depth ${exceptions} ! -type d -print0 | xargs -0 rm -f --
eval find . -xdev -depth ${exceptions} -type d -empty -exec rmdir '{}' \\';'
eend 0
else
ebegin "Cleaning /tmp directory"
{
rm -f /tmp/.X*-lock /tmp/esrv* /tmp/kio* /tmp/jpsock.* /tmp/.fam*
rm -rf /tmp/.esd* /tmp/orbit-* /tmp/ssh-* /tmp/ksocket-* /tmp/.*-unix
# 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
eend 0
fi
fi
#
# Create an 'after-boot' dmesg log
#
touch /var/log/dmesg
chmod 640 /var/log/dmesg
dmesg > /var/log/dmesg
#
# Check for /etc/resolv.conf, and create if missing
#
[[ -f /etc/resolv.conf ]] || touch /etc/resolv.conf &> /dev/null
}
# vim:ts=4
|
|
|
Back to top |
|
|
Freanan Tux's lil' helper
Joined: 14 Feb 2005 Posts: 113 Location: Esthal, Pfalz, Germany
|
Posted: Sun Aug 28, 2005 5:51 pm Post subject: |
|
|
Thanks, your version of the script fixed the error messages and the sound does work again.
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|