~ubuntu-branches/ubuntu/edgy/sysnews/edgy

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh -e
#DEBHELPER#

# The cron job was renamed.
if [ -e /etc/cron.daily/news ] && dpkg --compare-versions 0.9-7 gt "$2"; then
	mv -f /etc/cron.daily/news /etc/cron.daily/sysnews.dpkg-old || true
	rm -f /etc/cron.daily/news* 2>/dev/null || true
fi

# The postinst needs to know if the WELCOME file in the old directory was
# deleted, so it can delete the WELCOME file in the new location. It can't
# just check to see if it's there, because dpkg will delete it, as an
# unchanged removed conffile, before the ponstinst runs. Thus this gross
# hack. Note that I use a directory because that can be created safely w/o
# sysmlink attacks. Adding a file to /var/news/ makes dpkg emit puzzling
# messages, which is why I don't do that.
if [ -d /var/news -a ! -e /var/news/WELCOME ] && dpkg --compare-versions 0.9-8 gt "$2"; then
	mkdir /var/tmp/.sysnews_WELCOME_deleted
fi