I haven't dug into this script to figure out what the problem is, but when a Gentoo machine comes up after a catastrophic halt (e.g. power outage) services will fail to start because of the /var/run/*.pid files that remain. I believe that the bootmisc script is supposed to be wiping these out on boot, but doesn't. Examples are sshd & apache2. Also, the zap action on init.d scripts doesn't seem to wipe these files out, and it seems to me like it should. Reproducible: Always Steps to Reproduce: 1. rc-update add sshd default 2. /etc/init.d/sshd start 3. pull the power plug on your computer 4. reboot 5. note that sshd isn't running. Actual Results: sshd won't run until you rm /var/run/sshd.pid Expected Results: I believe the /etc/runlevels/boot/bootmisc script is supposed to find these latent *.pid files and wipe them out.
*** Bug 38436 has been marked as a duplicate of this bug. ***
Emerge info please.
Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.20-gentoo-r7) ================================================================= System uname: 2.4.20-gentoo-r7 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz Gentoo Base System version 1.4.3.13 distcc 2.11.2 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] Autoconf: sys-devel/autoconf-2.58-r1 Automake: sys-devel/automake-1.7.7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://gentoo.ccccom.com ftp://gentoo.ccccom.com http://cudlug.cudenver.edu/gentoo/" MAKEOPTS="-j6" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X alsa apm arts avi berkdb bonobo cdr crypt cups dvd encode esd foomaticdb gdbm gif gnome gpm gtk gtk2 gtkhtml guile imlib java jpeg kde ldap libg++ libwww mad maildir mikmod motif mozilla mpeg ncurses nls oggvorbis opengl oss pam pdflib perl png postgres python qt quicktime readline samba sdl slang spell ssl svga tcpd truetype video_cards_radeon x86 xml2 xmms xv zlib"
Could you edit bootmisc, and change: -- 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}" -o -L "${x}" ] then rm -f "${x}" fi fi done -- to: -- for x in $(find /var/run/ ! -type d ! -name utmp ! -name innd.pid ! -name random-seed) do local daemon="${x##*/}" daemon="${daemon%*.pid}" echo "*** daemon=$daemon ***" &>> /tmp/log.txt # Do not remove pidfiles of already running daemons if [ -z "`ps --no-heading -C "${daemon}"`" ] then " Trying $x ..." &>> /tmp/log.txt if [ -f "${x}" -o -L "${x}" ] then " Deling $x ..." &>> /tmp/log.txt rm -f "${x}" fi fi done --
And then of course do your 'catastrophic halt' and post log.txt here?
No response from user, closing