It seems that I have a problem with some gentoo script but I couldn't locate where the error cama from. When I start something like fetchmail or openssh demon I get : "/sbin/runscript: line 1: 2: command not found" But it does start right. Reproducible: Always Steps to Reproduce: 1.cd /etc/init.d/ 2. ./fetchmail stop 3. ./fetchmail start Actual Results: siri init.d # ./fetchmail stop /sbin/runscript.sh: line 1: 2: command not found * Stopping fetchmail... [ ok ] siri init.d # less /sbin/runscript.sh siri init.d # ./fetchmail start /sbin/runscript.sh: line 1: 2: command not found * Starting fetchmail... [ ok ] siri init.d # Expected Results: siri init.d # ./fetchmail stop * Stopping fetchmail... [ ok ] siri init.d # less /sbin/runscript.sh siri init.d # ./fetchmail start * Starting fetchmail... [ ok ] siri init.d # Portage 2.0.49-r15 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.4.20-gentoo-r5) ================================================================= System uname: 2.4.20-gentoo-r5 i686 AMD Athlon(TM) XP 2200+ Gentoo Base System version 1.4.3.10p1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=i686 -O3 -pipe -fomit-frame-pointer -w" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=i686 -O3 -pipe -fomit-frame-pointer -w" DISTDIR="/usr/portage/distfiles" FEATURES="ccache autoaddcvs sandbox buildpkg" GENTOO_MIRRORS="http://ftp.easynet.nl/mirror/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo http://gentoo.linux.no/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 oss avi crypt encode foomaticdb gif jpeg libg++ mad mpeg ncurses nls png quicktime spell truetype xml2 xmms xv zlib alsa gdbm berkdb slang readline tetex svga tcltk java X sdl tcpd pam libwww ssl perl python esd imlib oggvorbis gtk qt motif opengl mozilla cdr acpi acpi4linux bluetooth doc dvd emacs gtk2 jikes mbox moznocompose moznoirc moznomail samba tiff usb -apm -cups -gpm -gnome -mikmod -mmx -pdflib -arts -kde"
I get similar errors with different line numbers: rif Metalworks # /etc/init.d/alsasound stop /sbin/runscript.sh: line 116: error: command not found
I debugged my problem to line 116 in file /etc/init.d/asound: I think the line error "ALSA is not loaded" should be eerror -e "ALSA is not loaded" Maybe it is something similar in your case.
In my case it does not seems to come from there as I have this problem for fetchmail, Openssh, imadp-courier ... and many others
Please check this in /etc/rc.conf: -- # Set PROTOCOLS to the protocols that you plan to use. Gentoo Linux will only # enable module auto-loading for these protocols, eliminating annoying module # not found errors. # # NOTE: Do NOT uncomment the next lines, but add them to 'PROTOCOLS=...' line!! # # Num Protocol # 1: Unix # 2: IPv4 # 3: Amateur Radio AX.25 # 4: IPX # 5: DDP / appletalk # 6: Amateur Radio NET/ROM # 9: X.25 # 10: IPv6 # 11: ROSE / Amateur Radio X.25 PLP # 19: Acorn Econet # Most users want this: PROTOCOLS="1 2" -- You should uncomment PROTOCOLS and NOT each line with a number.