Re: Deploying config files revisited

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 11 Aug 2004, W. Eric Trull wrote:

> Back in July there was a "Deploying config files" thread about installing
> configuration files using RPM.  One of the questions asked was whether these
> files are owned by another package.  I have a similar situation in which the
> config files *are* owned by another package.
> 
> I'm setting up a cluster of Linux nodes in which I want to configure the ntp
> settings after the OS has been installed (kickstart install).  I already have
> an RPM that installs other configuration files (i.e. /etc/hosts,
> /etc/resolv.conf) and want to add our environment specific /etc/ntp.conf and
> /etc/ntp/step-tickers.  However, these two files are already owned by the ntp
> package.
> 
> During the installation of my package I'd like to move the current
> /etc/ntc.conf and /etc/ntp/step-tickers aside and then install my versions. 
> Anybody know how to get around the fact that the files are owned by another
> package and suggestions on how to move the current files before installing
> mine?
>
Hi Eric,

There are two basic mechanisms we use to do this where I work:

	- Deliver the config to seperate location as part of the files pay 
	  load, and in %post do something like:

		cat %my_config > %old_config

          Using cat like this keeps the same inode and thus all the same
	  file stats (perms, ownership, etc).
	- Surgically edit the file in a %post script.

Either way the orignal package continues to own the config.

In some cases we have used a trigger to do this such that if the package 
owning the config gets updated we can re-apply our changes.  Also, another 
thing that we do help us manage configs is we have a wrapper around rcs
called rcstool that we use to check-in changes to files.  This allows us 
to globally go back and put configs back just the way they were on a 
backout.  This wrapper and its associated tools is unfortunately not open
sourced (though, I am working on that slowly).

Good Luck...james 


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux