You are not logged in.

#1 2006-10-03 16:19:35

hbarnwheeler
Member
Registered: 2006-08-11
Posts: 37

Config file protection?

I am thinking of switching from gentoo to arch but have a question regarding config file protection.  Gentoo has a feature whereby the conf files in /etc are protected.  When the package manager installs a new application which stores config files in /etc it maintains the current copy and gives the new config file a unique filename, allowing the admin to look it over and decide whether to go with the new one, or modify it to his/her liking.  I know arch has "NoUpgrade" options, but if a file is not specified here, will Pacman simply overwrite old config files without warning?

Offline

#2 2006-10-03 16:22:12

detto
Member
Registered: 2006-01-23
Posts: 510

Re: Config file protection?

No, the default and used way (the arch way) is to copy new config files under /etc with a suffix .pacnew. For example /etc/rc.local.pacnew. smile

Offline

#3 2006-10-03 17:01:03

Deranger
Member
Registered: 2006-09-12
Posts: 35

Re: Config file protection?

detto wrote:

For example /etc/rc.local.pacnew. smile

Correct, but rc.local is NoUpgrade by default. As far as I know, all NoUpgrade files will be overwritten without any warning.


Code should be free and hardware should be cheap.

Offline

#4 2006-10-03 17:58:55

augustob
Member
From: Florianópolis, Brazil
Registered: 2006-03-17
Posts: 135

Re: Config file protection?

The Lone Deranger wrote:
detto wrote:

For example /etc/rc.local.pacnew. smile

Correct, but rc.local is NoUpgrade by default. As far as I know, all NoUpgrade files will be overwritten without any warning.

On the contrary! All NoUpgrade files are NOT overwritten.

Offline

#5 2006-10-03 19:04:43

hbarnwheeler
Member
Registered: 2006-08-11
Posts: 37

Re: Config file protection?

Thanks for the replies.  Is there a simple way to prevent pacman from overwriting all config files in /etc?  For instance, NoUpgrade = *.conf

Offline

#6 2006-10-03 19:33:22

paranoos
Member
From: thornhill.on.ca
Registered: 2004-07-22
Posts: 442

Re: Config file protection?

the default behaviour is to not overwrite any config files. you don't need to specify NoUpgrade anymore.

Offline

#7 2006-10-03 19:48:01

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,899
Website

Re: Config file protection?

true for system configs

but not for apps.... I know like sane wipes over gt68xx.conf every upgrade

[of course if you are clever you can add NoUpgrade = /etc/sane.d/gt68xx.conf to pacman.conf as stated!]


my2c


Mr Green

Offline

#8 2006-10-03 19:48:27

Romashka
Forum Fellow
Registered: 2005-12-07
Posts: 1,054

Re: Config file protection?

NoUpgrade options are left from previous Pacman versions. In that versions everything not in NoUpgrade list was saved as .pacsave and then overwritten with new version. Now Pacman's behaviour has changed, so it overwrites config files only if they were not modified by user. If config file was modified then it is not touched and new version is saved in .pacnew file.

See these historical bug reports:
http://bugs.archlinux.org/task/1925
http://bugs.archlinux.org/task/3620
http://bugs.archlinux.org/task/3644


to live is to die

Offline

#9 2006-10-03 19:57:52

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,899
Website

Re: Config file protection?

woah!!  wink ok


Mr Green

Offline

Board footer

Powered by FluxBB