LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-17-2008, 04:40 AM   #1
amit_pansuria
Member
 
Registered: Sep 2006
Posts: 73

Rep: Reputation: 15
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
 
Old 07-17-2008, 05:30 AM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
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.
 
Old 07-17-2008, 05:56 AM   #3
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,488

Rep: Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to overwrite a particular line of a file kkpal Linux - Newbie 1 05-16-2008 02:35 AM
Get rpm package file list and config informations tobiasw Linux - Newbie 1 10-22-2006 05:39 PM
rpm have --nodeps option with dpkg is such an option available deepclutch Debian 2 03-26-2006 09:49 PM
Installed a package via rpm YaST, now overwrite-upgrade to new with source? hgb Suse/Novell 3 11-14-2005 01:13 AM
Mouse scrolly doesn't work, even though added axis option in config file. RHLinuxGUY Slackware 8 07-22-2005 11:33 PM


All times are GMT -5. The time now is 11:54 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration