I know this is a classic example of a user (me) screwing around with things he shouldn't, but I still find this a bug. If the svcdir entry was changed in /etc/conf.d/rc, genenviron.awk script will complain that the no-longer existing /mnt/.init.d doesn't exist. I know this is rather confusing to explain. I'll describe the steps below. I traced it down /sbin/rc-envupdate.sh overriding SVCDIR when calling genenviron.awk. So I guess the question is whether or not svcdir should be changable (I would certainly like it to be -- flexibility is a good thing). Reproducible: Always Steps to Reproduce: 1. Change the svcdir entry in /etc/conf.d/rc 2. Create the new directory 3. Move everything from /mnt/.init.d to this new directory 4. Reboot and see the error.
It is. /etc/conf.d/rc get sourced by /sbin/functions.sh, which gets sourced by /sbin/depscan.sh, which pass SVCDIR as $svcdir to genenviron.awk. Have a look at the 1.8.6.* ebuilds .. they *do* change the location of svcdir ... Check that /etc/init.d/functions.sh is a symlink to /sbin/functions.sh? Might be a old version that do not use /etc/conf.d/rc ... Or attach your /sbin/depscan.sh ...
both /etc/init.d/functions.sh and /etc/init.d/depscan.sh are pointing to the correct locations: valkyrie init.d # ls -l functions.sh lrwxrwxrwx 1 root root 18 Jan 27 15:33 functions.sh -> /sbin/functions.sh valkyrie init.d # ls -l depscan.sh lrwxrwxrwx 1 root root 16 Jan 27 15:33 depscan.sh -> /sbin/depscan.sh And depscan.sh is indeed using ${svcdir} when it is calling the awk scripts, although I don't see it calling genenviron.awk -- it seems to be only for service dependency caching. I'll attach depscan.sh and rc-envupdate.sh (which is where I saw the original problem).
Created attachment 7939 [details] /sbin/depscan.sh for review doesn't seem to be anything wrong here.
Created attachment 7940 [details] /sbin/rc-envupdate.sh file for review Notice the way it is starting up the awk scripts: /bin/gawk -v SVCDIR="/mnt/.init.d"
Hmm, ok that one I missed. Worked this side as /mnt/.init.d/ still exited. Fixed on CVS, thanks: --------------------------------- 05 Feb 2003; Martin Schlemmer <azarah@gentoo.org>: Fix /sbin/rc-envupdate.sh to use $svcdir to set SVCDIR. This is thanks to Max Kalika <alkern23@yahoo.com>, bug #15050. --------------------------------- Works your side if you change it like depscan.sh ?
I'm pretty sure this is fixed in the new baselayout. This can be closed.
Yep.