remove the diversion in postinst, rather than preinst

Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
Dustin Kirkland 2009-05-26 17:12:36 +02:00
commit 2a47857ab0

View file

@ -5,9 +5,10 @@ PKG="byobu"
if [ -x "/usr/bin/screen.real" ]; then
# Byobu used to divert the real /usr/bin/screen, but we don't
# do this anymore; clean up old diversion if upgrading
if ls -alF /usr/bin/screen | grep -qs "/usr/bin/screen -> byobu"; then
rm -f /usr/bin/screen
fi
#if ls -alF /usr/bin/screen | grep -qs "/usr/bin/screen -> byobu"; then
# rm -f /usr/bin/screen
# mv /usr/bin/screen.real /usr/bin/screen
#fi
dpkg-divert --package "$PKG" --rename --remove /usr/bin/screen
fi