> I will keep the bug open for a while but do not expect any action from
> me, even if there is a solution to this problem it's probably complex
> enough that implementing it is not worth the effort (but still, I'd like
> to know if there is one).
The behavior one wants is:
if original file was modified
then move it to new location # dpkg will prompt the user when it tries to
install the new conffile
else just delete it # dpkg will install the new conffile without prompting
fi
Do it in the preinst:
case "$1" in
upgrade)
if [ -f /etc/blah/oldconf ] ; then
case "$(md5sum /etc/blah/oldconf | sed -e
's/[[:space:]].*$//')" in
94c8c671fce0969e67bc21bd26b47e6c|\
fb35106269b429cd8bd6bf8f5a795f6f|\
dfcbadd99c3064775817484bf0b653e2)
# It's a released version -- don't move it
:
;;
*)
# It was changed by user
if [ -f /etc/blah/newconf ] ; then
mv -f /etc/blah/oldconf
/etc/blah/oldconf.dpkg-old
else
# Copy to new location
# dpkg will compare with new file and prompt
the user
cp -p /etc/blah/oldconf /etc/blah/newconf
# N.B. Delete /etc/blah/oldconf in postinst
fi
;;
esac
fi
--
Thomas Hood <[EMAIL PROTECTED]>
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]