RPM Community Forums

Mailing List Message of <rpm-users>

Q: updating a config file

From: Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>
Date: Tue 11 Jun 2013 - 09:58:12 CEST
Message-Id: <51B6F4B4020000A1000114BA@gwsmtp1.uni-regensburg.de>

I have a question that seems to be an FAQ:
One of my packages ships a template for a config file that is updated during %post. Unfortunately that update means that (variable) lines are appended to the config file.

(In my case these changes cause the software to misbehave as the lines indicate action to be performed by the software)

Now I found out that after update, lines were added to the config file that had been added before, meaning that the config file was not replaced by the template before %post ran.

So what could I do (except looking if a line to be added is already there)?
renaming or removing the existing config file in %pre?

When does RPM rename the modified config file automatically?

Is there a pattern I should follow?

Ulrich Windl
Received on Tue Jun 11 09:59:28 2013
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.