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

Re: /etc/ question



On Sun, Feb 25, 2001 at 05:15:37AM +0100, Eric Van Buggenhaut wrote:
> > Remember to correctly unwind, moving the conffile back to its original place
> > (as long as the original file does not exist) in the abort-install and
> > abort-upgrade targets of preinst, postrm and postinst. [never tried this,
> > but that seems to be what's needed from the not-so-clear policy chapter 6]
> 
> In the package I maintain, called crafty, I moved /etc/craftyrc to
> /etc/crafty.rc and /var/cache/crafty to /var/lib/crafty in the previous
> version (17.9). Version now is 17.13. The 'move' routine is still in preinst
> of the latest version because we don't know what version people are upgrading
> from.
> 
> Now that's my problem : if upgrade fails or is aborted, I should move the files
> back to their original location. But if people are upgrading from a 'post-move'
> version, the original location is different than if they were upgrading from a
> 'pre-move' location.
> 
> So, where do I move the files back ???

Copy in the preinst, remove the old one in the postinst (with
"configure" argument).  That'll do the job.

   Julian

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

         Julian Gilbey, Dept of Maths, Queen Mary, Univ. of London
       Debian GNU/Linux Developer,  see http://people.debian.org/~jdg
  Donate free food to the world's hungry: see http://www.thehungersite.com/



Reply to: