/var like dir accessible early in boot sequence

2007-01-16 Thread Tim Dijkstra
Hi,

We need a directory, which is accessible very very early during boot.
It has some files in it which are regenerated at regular intervals, but
not (necessarily) during boot. Actually we know generate it during
runlevels 0 and 6.

For know we put this in /lib/$package. I'm not sure this OK, because it
means we will write to / also when we're not installing
packages. /var/lib seems better, but that is not available that early.
If it is really necessary we could generate the information during
boot, so maybe /lib/init/rw?

Comments?

grts Tim


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: /var like dir accessible early in boot sequence

2007-01-16 Thread Goswin von Brederlow
Tim Dijkstra [EMAIL PROTECTED] writes:

 Hi,

 We need a directory, which is accessible very very early during boot.
 It has some files in it which are regenerated at regular intervals, but
 not (necessarily) during boot. Actually we know generate it during
 runlevels 0 and 6.

 For know we put this in /lib/$package. I'm not sure this OK, because it
 means we will write to / also when we're not installing
 packages. /var/lib seems better, but that is not available that early.
 If it is really necessary we could generate the information during
 boot, so maybe /lib/init/rw?

 Comments?

 grts Tim

/lib/$package is obviously wrong. That might not be writable during
boot or even ever (apart from package installation time).

If you need the info during boot before networking and /var is there
then it must be on / or generated and you must not write to / outside
of package installation time.

So do you see any other choice but /lib/init/rw?


If generating that info is expensive then you could check for
/var/lib/package/. If it doesn't exist then you fallback to
/etc/init/rw/ and generate the info. Later in the boot process you can
move the info from /etc/init/rw to /var/lib/package or just delete it
if /var/lib/package needs no update.

Many people have /var on / or at least as local filesystem. Depending
on how early you need the info and depending on the setup /var might
just be there saving you the time, or it might not. It must be
possible to use with /var on nfs or the like and / read-only. So go
/lib/init/rw. *cheer*

MfG
Goswin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]