"Sean 'Shaleh' Perry" <[EMAIL PROTECTED]> wrote: >On 23-Feb-2001 Amaya wrote: >> Of course not! ;-) I'd just move them to the new location. >> But, I'm starting to think this is not a good idea, maybe. > >after talking with other devels here is a method: > >in your preinst, check for /etc/foo and if it exists, mkdir /etc/package and >copy /etc/foo there. Then remove /etc/foo. Import thing here is that the >preinst should not die because of any errors here. > >Your package contains /etc/package/foo. When dpkg gets to the point where the >conffile will be installed, it will do the usual checking if the conffile >should be changed and prompting the user.
You have to be even more careful than that, since the installation might fail and dpkg might want to unwind the maintainer scripts - so 'postrm abort-upgrade' and 'postrm abort-install' need to move the file back if possible. -- Colin Watson [EMAIL PROTECTED]