Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 20851 - baselayout-1.8.6.7: /sbin/runscript.sh failures
Summary: baselayout-1.8.6.7: /sbin/runscript.sh failures
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
: 20849 (view as bug list)
Depends on:
Blocks: 20849
  Show dependency tree
 
Reported: 2003-05-12 10:57 UTC by FL
Modified: 2004-04-09 00:58 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/sbin/function.sh like i use it (functions.sh,12.32 KB, text/plain)
2003-05-13 14:42 UTC, FL
Details
/sbin/rc like i use it (rc,14.20 KB, text/plain)
2003-05-13 14:44 UTC, FL
Details
function.sh without export (functions.sh.patch,307 bytes, patch)
2003-05-14 05:17 UTC, Jörg Gollnick
Details | Diff
rc-service.sh without export (rc-services.sh.patch,368 bytes, patch)
2003-05-14 05:18 UTC, Jörg Gollnick
Details | Diff
rc-daemon.sh without export (rc-daemon.sh.patch,325 bytes, patch)
2003-05-14 05:19 UTC, Jörg Gollnick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description FL 2003-05-12 10:57:05 UTC
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"
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2003-05-12 17:37:49 UTC
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.
Comment 2 FL 2003-05-13 02:11:58 UTC
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"
Comment 3 FL 2003-05-13 02:32:32 UTC
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
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2003-05-13 13:28:17 UTC
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.
Comment 5 FL 2003-05-13 14:42:58 UTC
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
Comment 6 FL 2003-05-13 14:44:46 UTC
Created attachment 11927 [details]
/sbin/rc like i use it

see function.sh
Comment 7 FL 2003-05-13 14:45:40 UTC
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.
Comment 8 Jörg Gollnick 2003-05-14 05:17:58 UTC
Created attachment 11958 [details, diff]
function.sh without export
Comment 9 Jörg Gollnick 2003-05-14 05:18:44 UTC
Created attachment 11959 [details, diff]
rc-service.sh without export
Comment 10 Jörg Gollnick 2003-05-14 05:19:12 UTC
Created attachment 11960 [details, diff]
rc-daemon.sh without export
Comment 11 Jörg Gollnick 2003-05-14 05:23:05 UTC
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.
Comment 12 FL 2003-05-14 14:25:56 UTC
thank you for the patches. my problem is now solved
Comment 13 Martin Schlemmer (RETIRED) gentoo-dev 2003-05-14 14:43:10 UTC
*** Bug 20849 has been marked as a duplicate of this bug. ***
Comment 14 Martin Schlemmer (RETIRED) gentoo-dev 2003-05-14 14:44:17 UTC
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.
Comment 15 FL 2003-05-15 00:49:35 UTC
my actual bash version is 2.05b-r5
Comment 16 Nathan W. Labadie 2003-05-19 09:36:14 UTC
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 
Comment 17 Martin Schlemmer (RETIRED) gentoo-dev 2003-05-21 11:02:44 UTC
Can you guys please try baselayout-1.8.6.8-r1 ?  THanks.
Comment 18 Jason Waldhelm 2003-05-21 18:49:40 UTC
baselayout-1.8.6.8-r1 fixes the problem.  many thanks. 
Comment 19 Martin Schlemmer (RETIRED) gentoo-dev 2003-05-21 23:58:53 UTC
Ok, great.
Comment 20 Tarragon M. Allen 2004-04-09 00:57:25 UTC
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.