[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: .rpmsave vs .rpmnew
- From: Mark Amidon <amidon caldera com>
- To: rpm-list redhat com
- Subject: Re: .rpmsave vs .rpmnew
- Date: Wed, 25 Jul 2001 14:08:33 -0400
Jeff Johnson wrote:
> Hmmm, the existing config is renamed to .rpmsave and/or .rpmorig, that's a
> whole different algorithm/disposition involving FA_SAVE/FA_BACKUP than the
> FA_ALTNAME .rpmnew extension disposition for the file from the new package.
Well, pshaw. RPM internals won't be handling it then. Thank you, Jeff,
even if the answer wasn't what we desired/hoped-for.
>
> On Wed, Jul 25, 2001 at 12:31:30PM EDT, Alan Eldridge wrote:
> > I don't want the existing conf renamed. The existing conf should
> > still work after installation without manual intervention to rename
> > a file back.
If this is a package that _you_ are building, then you can run a
post-install script which checks for the presence of a
/etc/package-config file with the .rpmsave or .rpmorig extension, and
then rename the new config to the .rpmnew extension and rename the old
config back.
if [ -f /etc/myRpmConfig.rpmsave ] ; then
mv /etc/myRpmConfig /etc/myRpmConfig.rpmnew
mv /etc/myRpmConfig.rpmsave /etc/myRpmConfig
else
if [ -f /etc/myRpmConfig.rpmorig ] ; then
mv /etc/myRpmConfig /etc/myRpmConfig.rpmnew
mv /etc/myRpmConfig.rpmorig /etc/myRpmConfig
fi
fi
Of course, you may also want to write a preinstall script which checks
for the presence of those files before your package tries to overwrite
them, but that's getting a bit too hairy for dangling theoreticals.
--
Mark Amidon | "Linux is a cancer that attaches itself
amidon@caldera.com | in an intellectual property sense to
(978) 251-1987 x252 | everything it touches."
http://www.VolutionOnline.com | -- MSFT's Steve Ballmer, lying
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[]