Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to make my RPM to preserve configuration files, if these exist.

The behavior should be like MySQL or Lighttpd, where new configuration files, if the old present, are saved with the extension .rpmnew.

Any idea what best method to achieve it?

Thanks in advance.

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

RPM does this automatically for files marked with the %config attribute in your spec file. Exactly what happens depends on whether the configuration file has been modified locally and whether you have used just %config or %config(noreplace).

Read more here.

share|improve this answer
1  
For less specific, but more 'official' see: rpm.org/wiki/PackagerDocs/Spec –  Scott Pack Dec 13 '10 at 21:28
    
Thanks for the advice! –  SyRenity Dec 14 '10 at 11:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.