Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 430382

Summary: /lib64/rc/cache write assumed
Product: Gentoo Hosted Projects Reporter: Walter <walter>
Component: OpenRCAssignee: OpenRC Team <openrc>
Status: RESOLVED FIXED    
Severity: normal CC: dschridde+gentoobugs
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 417391    

Description Walter 2012-08-08 03:32:37 UTC
In the case of a read-only root (such as diskless boot with NFS, as on a cluster I am building) the apparent assumption of write to /lib64/rc/cache is spurious.

Assumption lives in the file init.d/savecache.in

Similar to the test against clock skew, a test for write could be performed similarly to the following (not tested).

# check if either:
#  - cache file exists and is writable
#  - cache file doesn't exist, but $RC_LIBEXECDIR exists and is writable
if [ -w "$RC_LIBEXECDIR"/cache || [ ! -e "$RC_LIBEXECDIR"/cache && -w "$RC_LIBEXECDIR" ] ]; then
 # ... existing code here
else
 eerror "Not saving deptree cache"
 return 1
fi
Comment 1 William Hubbs gentoo-dev 2012-09-08 00:28:40 UTC
A fix for this has been implemented in commit a087744.
Comment 2 Dennis Schridde 2012-09-10 19:05:29 UTC
Same issue might exist for other directories, too:
https://bugzilla.redhat.com/show_bug.cgi?id=537969#c17

I got several messages similar to:
mkdir `/lib64/rc/init.d/starting': Read-only file system

I do not remember the OpenRC version, though. Probably the latest ppc64 or ~ppc64 version.