I'm working on an image that has an e.g. an LDAP server and mail server, and uses readonly-root The $STATE_MOUNT stuff fairly well for putting the persistent data on a separate disk, apart from one problem - it would be much nicer to have the list of files/directories on the image rather than the persistent data disk Also, we should probably make an effort to have good defaults when it comes to persistent data. Things like SSH keys, databases, mail queues etc. should all probably default to using the $STATE_MOUNT stuff So, I'm attaching a patch to add /etc/statetab. Some details: - It has a similar behaviour to /etc/rwtab "files" type except if the file/directory already exists at the destination, we don't copy it across before bind-mounting - Theres an /etc/statetab.d too - Any /etc/statetab or /etc/statetab.d/* file on the destination disk overrides the version on the image - this allows you to override the configuration on the image - $STATE_MOUNT/files can be used for additional bind mounts - I've removed the puppet CA cert stuff - that could go in the default /etc/statetab, I think
Created attachment 139130 [details] initscripts-8.45.1-statetab.patch
I like it. I have no clue why I didn't see something like this as much cleaner and more maintainable when compared to having the default list of bind mounts kept outside the readonly FS image. Jeff
Seems ok at first glance. Where are we going to need this?
Just rawhide I think ....
Agreed, rawhide should be fine. Jeff
Added in CVS, will be in 8.46-1.
Created attachment 139315 [details] statetab2.patch Perhaps install a sample /etc/statetab and create /etc/statetab.d ?
Looks good, added.
Created attachment 139594 [details] initscripts-statetab3.patch Wait! There's more! (Doh, sorry) We should have a better default for $STATE_MOUNT and have the package create the default dir
Adding, building as 8.46-1.