General
cancel
Showing results for 
Search instead for 
Did you mean: 

Delivering configuration files in SD packages

SOLVED
Go to solution

Delivering configuration files in SD packages

Hi,

I'm creating a package of some software that will deliver a configuration file (e.g., /etc/opt/rt/myprogram.conf). I'd like to deliver a default configuration file that allows the program to work, but also allow the user to edit the configuration file, and not have their changes overwritten if they upgrade my package.

I assume one way to do this is to deliver the configuration file to /usr/newconfig, and have my postinstall script copy it to /etc if it doesn't already exist there. This would let the user examine the new file for any changes they might need to make to their existing configuration.

Alternatively, I see there's a 'volatile' flag that can be set on files in the PSF -- but it's not clear if this is sufficient to prevent the file being overwritten on upgrade, or if it just prevents swverify from complaining if it's edited.

Is there a recommended (or documented) way to do this?

Thanks.
2 REPLIES
Dennis Handly
Acclaimed Contributor
Solution

Re: Delivering configuration files in SD packages

>I assume one way to do this is to deliver the configuration file to /usr/newconfig, and have my postinstall script

I would suggest a configure script.

>it's not clear if this is sufficient to prevent the file being overwritten on upgrade, or if it just prevents swverify from complaining if it's edited.

Only the latter.

>Is there a recommended

Your /usr/newconfig/ idea seems best.

Re: Delivering configuration files in SD packages

Thanks - I'll go with that then.