~ubuntu-branches/ubuntu/intrepid/linuxlogo/intrepid

« back to all changes in this revision

Viewing changes to debian/postrm

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2008-06-20 09:19:00 UTC
  • mfrom: (4.1.2 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080620091900-4xzuv7c7ntxvs7wt
Tags: 5.03-4
* Adding patch to fix FTBFS on s390x.
* Updating to standards 3.8.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh
2
 
# postrm script for linuxlogo
3
 
#
4
 
# see: dh_installdeb(1)
 
1
#!/bin/sh
5
2
 
6
3
set -e
7
4
 
8
 
case "$1" in
9
 
       purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
10
 
           if [ "remove" = "$1" ]
11
 
           then
12
 
               rm -f /etc/issue.linuxlogo /etc/issue.linuxlogo.ascii
13
 
               rm -rf /var/run/linuxlogo/ 
14
 
               DIVERT=`dpkg-divert --list linuxlogo | cut --delimiter=" " --fields=1`
15
 
               if [ "$DIVERT" ]
16
 
               then
17
 
                   [ -e /etc/issue.linuxlogo ] && rm -f /etc/issue && \
18
 
                   dpkg-divert --package linuxlogo --remove --quiet \
19
 
                   --divert /etc/issue.linuxlogo /etc/issue
20
 
 
21
 
                   # Make sure that /etc/issue exists...
22
 
                   if [ ! -f /etc/issue ]
23
 
                   then
24
 
                       echo -n "Restoring the original /etc/issue..."
25
 
                       echo "Debian GNU/\s `cat /etc/debian_version`  \n \l" > /etc/issue
26
 
                       echo "done."
27
 
                   fi
28
 
               fi
29
 
           fi
30
 
       ;;
31
 
 
32
 
    *)
33
 
        echo "postrm called with unknown argument \`$1'" >&2
34
 
        exit 1
35
 
 
 
5
case "${1}" in
 
6
        purge|remove)
 
7
                rm -f /etc/issue.linuxlogo /etc/issue.linuxlogo.ascii
 
8
                rm -rf /var/run/linuxlogo/
 
9
                ;;
 
10
 
 
11
        upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
 
12
 
 
13
                ;;
 
14
 
 
15
        *)
 
16
                echo "postrm called with unknown argument \`${1}'" >&2
 
17
                exit 1
 
18
                ;;
36
19
esac
37
20
 
38
 
# dh_installdeb will replace this with shell code automatically
39
 
# generated by other debhelper scripts.
40
 
 
41
21
#DEBHELPER#
42
22
 
43
23
exit 0