when i try to start a programm (i tried different, always the same) automatically at boottime using /etc/conf.d/local.start i got this errors: 1. /sbin/runscript.sh: line 27: /softlevel: No such file or directory (what is obvious because it is in /mnt/.init.d/softlevel or /var/lib/init.d/softlevel) 2. /sbin/runscript.sh: line 384: wrap_rcscript: command not found 3. /sbin/runscript.sh: line 385: eerror: command not found to install baselayout-1.8.6.7 i had to rebuild gawk. i had the newest version but the program thought i hadn't. but i think this is not a problem course after rebuilding baselayout got emerged. Reproducible: Always Steps to Reproduce: 1. just put a programm what should be strated at boottime in /etc/conf.d/local.start 2. reboot 3. Actual Results: see Details please Expected Results: see Details please Portage 2.0.48_pre5 (default-x86-1.4, gcc-3.3, glibc-2.3.2-r1) ================================================================= System uname: 2.4.20-wolk4.0s i686 AMD Athlon(tm) Processor GENTOO_MIRRORS="http://gentoo.oregonstate.edu/ http://www.ibiblio.org/pub/Linux/distributions/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="/usr/local/portage" USE="x86 oss 3dnow avi crypt encode gif jpeg libg++ libwww mikmod mmx mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms zlib directfb alsa gdbm berkdb slang readline aalib svga tcltk java X sdl gpm tcpd pam ssl perl python imlib oggvorbis gtk motif opengl mozilla dvd fbcon gtk2 gtkhtml jikes mozaccess-builtin moznoirc moznomail tiff xfs xinerama xml xosd xv -apm -arts -cups -kde -qt -esd -gnome" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon -O3 -pipe" CXXFLAGS="-O2 -mcpu=i686 -pipe" ACCEPT_KEYWORDS="x86 ~x86" MAKEOPTS="-j2" AUTOCLEAN="yes" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" FEATURES="sandbox ccache"
Attach your /etc/conf.d/local.start please. A reason for the '/softlevel' could be that $svcdir is not set properly. Please do: # grep -re '^[[:space:]]*svcdir=' /etc/* /sbin/* and paste output.
grep -re '^[[:space:]]*svcdir=' /etc/* /sbin/* gives me /etc/conf.d/rc:svcdir="/var/lib/init.d" /etc/conf.d/rc.old:svcdir="/mnt/.init.d" /etc/init.d/functions.sh:svcdir="/var/lib/init.d" /etc/init_d.old/functions.sh:svcdir="/var/lib/init.d" /etc/init_d.old/init.d/functions.sh:svcdir="/var/lib/init.d" /sbin/functions.sh:svcdir="/var/lib/init.d"
oh sry and my local.start (ther version i want to use it). it has only one command /etc/conf.d/local.start: # $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/local.start,v 1.4 2002/11/18 19:39:22 azarah Exp $ # This is a good place to load any misc. # programs on startup ( 1>&2 ) /root/background start
put a 'echo "FUNCTIONS.SH is sourced"' or something into /sbin/functions.sh, and check if that is printed. Might also be that it is not sourced ... if that the case, please try to figure out why, or maybe attach both functions.sh and runscript.sh.
Created attachment 11926 [details] /sbin/function.sh like i use it this file is patched with the bootprogressbar patch which you can find here: http://forums.gentoo.org/viewtopic.php?t=26494&start=100 i patched it manually and it seems not causing the problem
Created attachment 11927 [details] /sbin/rc like i use it see function.sh
function.sh IS sourced course i patched it manually with the bootprogressbar and it is working. BUT THIS PATCH HAS NOTHING TO DO WITH THE PROBLEM: i tried to boot with the patched and unpatched files, but the unpatched doesn't work too. so i give you my two files as an attachment.
Created attachment 11958 [details, diff] function.sh without export
Created attachment 11959 [details, diff] rc-service.sh without export
Created attachment 11960 [details, diff] rc-daemon.sh without export
The real source of this problems is the export of RC_GOT_FUNCTIONS in /sbin/functions.sh. Every time you start a subshell in an Script, which use /sbin/functions.sh this variable source this file again. The variables inside are the scripts are not exported. To fix this all or no variables should be exported.
thank you for the patches. my problem is now solved
*** Bug 20849 has been marked as a duplicate of this bug. ***
Weirdness is. What version of bash ? Over here, at work, etc it just works fine. Thanks anyhow! I will change in cvs and after a bit of testing do a new baselayout.
my actual bash version is 2.05b-r5
Exact same problem here. Using fcron, I get the following output sent to me: ---snip--- /sbin/runscript.sh: line 27: /softlevel: No such file or directory /sbin/runscript.sh: line 384: wrap_rcscript: command not found /sbin/runscript.sh: line 385: eerror: command not found ---snip--- This is from an sh script sitting in cron.daily that calls the following: /etc/init.d/snort restart
Can you guys please try baselayout-1.8.6.8-r1 ? THanks.
baselayout-1.8.6.8-r1 fixes the problem. many thanks.
Ok, great.
This problem seems to have resurfaced. I am using bash 2.05b-r9 and baselayout 1.8.8 and get a couple of errors during boot such as : /sbin/runscript.sh: line 27: /var/lib/init.d/softlevel: no such file or directory It doesn't appear to cause any problems (system is working fine otherwise), but it's a bit of a niggle I'd like resolved.