Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 47250 - baselayout-1.8.6.13: depscan.sh fails to create /var/lib/init.d/* directories in some cases
Summary: baselayout-1.8.6.13: depscan.sh fails to create /var/lib/init.d/* directories...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Aron Griffis (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-08 11:15 UTC by Terje Bergström
Modified: 2004-04-12 20:53 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Terje Bergström 2004-04-08 11:15:22 UTC
In depscan.sh, the following block should create the directories under
/var/lib/init.d if they do not exist. 

for x in ${svcdir} softscripts snapshot options started
do
        if [ ! -d "${x}" ]
        then
                if ! mkdir -p -m 0755 "${svcdir}/${x}" 2>/dev/null
                then
                        eerror " Could not create needed directory '${svcdir}/${
x}'!"
                fi
        fi
done

It fails, because the condition for checking the existance of directory,
-d "${x}", does not include the whole path. The correct test would be -d "${svcdir}/${x}". 

This caused my computer to start looping in boot right after running depscan.sh, because it tried to mark services as started, but as "started" directory did not exist, it couldn't.

This problem started when my root partition crashed, and for some reason directory called "started" appeared in my root directory.

Reproducible: Always
Steps to Reproduce:
1.Create directory /started
2.Run depscan.sh while chdir=/


Actual Results:  
/var/lib/init.d was empty, and computer unable to continue booting. 

Expected Results:
Comment 1 Aron Griffis (RETIRED) gentoo-dev 2004-04-12 08:36:38 UTC
Thanks, I've applied this fix in the rc-scripts cvs, will mark this bug resolved when I'm able to release an updated baselayout ebuild
Comment 2 Aron Griffis (RETIRED) gentoo-dev 2004-04-12 20:53:16 UTC
Fixed in baselayout-1.8.9