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

Re: package config



On Tue, 20 May 2008 08:34:10 +0200, Anthony  <anthony.berger@cea.fr> said: 

> Hello, everybody I have a little question about ucf (example with a
> package which contains a file package_file.conf)

> Can i use de package_file.conf.dpkg-old generate by the ucf utility?

        Use it for what?

> I would like to know how can i restore the old conf files after use
> ucf.?

        If this is in a maintainer script, just don't run ucf. If this
 is as an end user, you should have been asked a question had you
 modified the file -- and yes, you can recover the older version of the
 file.

> I have created a package which manage some files with ucf BUT when i
> remove the package i would like to restore the files before the
> installation .  I could rename the file package_file.conf.dpkg-old in
> package_file.conf in postrm script (remove)

        The dpkg.old file might not exist at that point ( the user might
 have gotten rid of it, for one thing). If you want to reliably do that,
 copy the file somewhere safe, and restore from your cached location
 later.  Depending on the old file being around is risky.

        manoj
-- 
You have a tendency to feel you are superior to most computers.
Manoj Srivastava <srivasta@debian.org> <http://www.debian.org/~srivasta/>  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C


Reply to: