LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to prevent overwrite particular config file when using rpm --replacefile option (https://www.linuxquestions.org/questions/linux-general-1/how-to-prevent-overwrite-particular-config-file-when-using-rpm-replacefile-option-656331/)

amit_pansuria 07-17-2008 04:40 AM

how to prevent overwrite particular config file when using rpm --replacefile option
 
Helo I have already installed manbase - 4.0.0.0.15

Now I m installing newver version of the same rpm using

rpm -iv -replacefiles manbase -4.0.0.0.16

But using this option my important config files is overwrite.

now I want that using

first check whethere config file is there or not.
if file is not there then allow then to install
if file is there then dont allow it to overwrite

so rpm provide particular option to handle this.

Regards,
Amit

stress_junkie 07-17-2008 05:30 AM

I would just make a copy of the original configuration file. Once the software is installed you can put the original file(s) back from your copy of them.

colucix 07-17-2008 05:56 AM

Apart the good advice by stress_junkie, you can try the --excludepath option:
Quote:

--excludepath OLDPATH
Don’t install files whose name begins with OLDPATH.
Also for testing you may consider --test (it does not actually do anything, just testing) along with the -v (verbose) or -vv (very verbose) option.


All times are GMT -5. The time now is 07:47 PM.