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

Re: keeping files from one version to the other.



On Tue, Feb 27, 2001 at 02:20:15AM +0100, Eric Van Buggenhaut wrote:
> So, ...
> 
> Is it OK if I include /var/lib/crafty in debian/conffiles ? Do I have to
> include every file or just /var/lib/crafty/* ?

No, it isn't at all.  Any configuration files MUST reside in /etc.
These are not configuration files (the sorts of things used to
configure a package), but score/state files, if I recall correctly.
So how about this scheme:

In the .deb, supply:
  /usr/lib/crafty/scores.default
  /usr/lib/crafty/saves.default
etc., all 644 root.root, and also the dir:
  /var/lib/crafty
which is 2755 root.games.

Then in the postinst, when called with the argument "configure":

for i in scores saves ...
do
  if [ ! -f /var/lib/crafty/$i ]
  then
    cp /usr/lib/crafty/$i.default /var/lib/crafty/$i
    chgrp games /var/lib/crafty/$i
    chmod 664 /var/lib/crafty/$i
  fi
done

And in the postrm, when called with the argument "purge":

for i in scores saves ...
do
  rm -f /var/lib/crafty/$i
done

   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: