Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 15050 - genenviron.awk complains about missing /mnt/.init.d if svcdir was changed in /etc/conf.d/rc
Summary: genenviron.awk complains about missing /mnt/.init.d if svcdir was changed in ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-03 12:09 UTC by Max Kalika (RETIRED)
Modified: 2003-03-27 15:02 UTC (History)
0 users

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


Attachments
/sbin/depscan.sh for review (depscan.sh,744 bytes, text/plain)
2003-02-04 21:13 UTC, Max Kalika (RETIRED)
Details
/sbin/rc-envupdate.sh file for review (rc-envupdate.sh,723 bytes, text/plain)
2003-02-04 21:15 UTC, Max Kalika (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Max Kalika (RETIRED) gentoo-dev 2003-02-03 12:09:30 UTC
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.
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2003-02-04 18:58:44 UTC
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 ...

Comment 2 Max Kalika (RETIRED) gentoo-dev 2003-02-04 21:12:00 UTC
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).

Comment 3 Max Kalika (RETIRED) gentoo-dev 2003-02-04 21:13:31 UTC
Created attachment 7939 [details]
/sbin/depscan.sh for review

doesn't seem to be anything wrong here.
Comment 4 Max Kalika (RETIRED) gentoo-dev 2003-02-04 21:15:13 UTC
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"
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2003-02-05 04:56:42 UTC
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 ? 
Comment 6 Max Kalika (RETIRED) gentoo-dev 2003-03-27 11:43:51 UTC
I'm pretty sure this is fixed in the new baselayout.  This can be closed. 
Comment 7 Martin Schlemmer (RETIRED) gentoo-dev 2003-03-27 15:02:19 UTC
Yep.