~ubuntu-branches/debian/sid/policycoreutils/sid

« back to all changes in this revision

Viewing changes to debian/policycoreutils.prerm

  • Committer: Package Import Robot
  • Author(s): Laurent Bigonville
  • Date: 2012-03-20 19:50:46 UTC
  • Revision ID: package-import@ubuntu.com-20120320195046-e0u3p8oxbk1a1qcg
Tags: 2.1.10-5
* Team upload.
* Switch to dh sequence and debhelper 9
* Merge my missing patches
* d/p/fix-ftbfs-hardening-flags.patch: Fix FTBFS with hardening flags
* d/policycoreutils.lintian-overrides: Drop non-standard-toplevel-dir selinux/
* debian/patches/0006-default-config.patch: Properly disable sandbox by
  default
* Rewrite maintainer scripts to use debhelper generated stanza.
  (Should closes: #660345)
* debian/control: Update Vcs-* fields
* Add debian/gbp.conf file
* debian/control:
  - Add Pre-Depends: ${misc:Pre-Depends} field
  - Make policycoreutils arch:linux-any
  - Put under the Debian SELinux team maintenance
  - Bump python-setools dependency to >= 3.3.7-2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh
2
 
#                               -*- Mode: Sh -*- 
3
 
# prerm --- 
4
 
# Author           : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com ) 
5
 
# Created On       : Fri Nov 14 12:16:39 2003
6
 
# Created On Node  : glaurung.green-gryphon.com
7
 
# Last Modified By : Manoj Srivastava
8
 
# Last Modified On : Sat Aug 12 23:30:45 2006
9
 
# Last Machine Used: glaurung.internal.golden-gryphon.com
10
 
# Update Count     : 11
11
 
# Status           : Unknown, Use with caution!
12
 
# HISTORY          : 
13
 
# Description      : 
14
 
#
15
 
# arch-tag: a4c1a888-137d-4800-98f8-93d0365422d8 
16
 
17
 
# This program is free software; you can redistribute it and/or modify
18
 
# it under the terms of the GNU General Public License as published by
19
 
# the Free Software Foundation; either version 2 of the License, or
20
 
# (at your option) any later version.
21
 
#
22
 
# This program is distributed in the hope that it will be useful,
23
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
24
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25
 
# GNU General Public License for more details.
26
 
#
27
 
# You should have received a copy of the GNU General Public License
28
 
# along with this program; if not, write to the Free Software
29
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
30
 
#
31
 
32
 
 
33
 
# Abort if any command returns an error value
34
 
set -e
35
 
 
36
 
package_name=policycoreutils
37
 
 
38
 
if [ -z "$package_name" ]; then
39
 
    print >&2 "Internal Error. Please report a bug."
40
 
    exit 1;
41
 
fi
42
 
 
43
 
 
44
 
# This script is called as the first step in removing the package from
45
 
# the system.  This includes cases where the user explicitly asked for
46
 
# the package to be removed, upgrade, automatic removal due to conflicts,
47
 
# and deconfiguration due to temporary removal of a depended-on package.
48
 
 
49
 
# Info files should be uninstalled from the dir file in any case.
50
 
##: install-info --quiet --remove /usr/info/${package_name}.info
51
 
 
52
 
case "$1" in
53
 
  remove)
54
 
    # This package about to be removed.
55
 
    :
56
 
 
57
 
    # Remove package-specific directories from /usr/local.  Don't try
58
 
    # to remove standard directories such as /usr/local/lib.
59
 
    ##: if test -d /usr/local/lib/${package_name}; then
60
 
    ##:   rmdir /usr/local/lib/${package_name} || true
61
 
    ##: fi
62
 
 
63
 
    # Deactivate menu-methods script.
64
 
    ##: chmod a-x /etc/menu-methods/${package_name}
65
 
 
66
 
    # Withdraw our version of a program.
67
 
    ##: update-alternatives --remove program /usr/bin/alternative
68
 
 
69
 
    # Get rid of the installed docs
70
 
    ##: if which install-docs >/dev/null 2>&1; then
71
 
    ##:     install-docs -r $package_name
72
 
    ##: fi
73
 
    
74
 
    # Get rid of the byte compiled files
75
 
    ##: if [ -x /usr/lib/emacsen-common/emacs-package-remove ]; then
76
 
    ##:      /usr/lib/emacsen-common/emacs-package-remove $package_name
77
 
    ##: fi
78
 
 
79
 
    if [ -L /usr/doc/$package_name ]; then
80
 
        rm -f /usr/doc/$package_name
81
 
    fi
82
 
 
83
 
    if which update-python-modules >/dev/null 2>&1; then
84
 
        update-python-modules -c -i /usr/share/python-support/${package_name}
85
 
    fi
86
 
 
87
 
    # There are two sub-cases:
88
 
    if test "${2+set}" = set; then
89
 
      if test "$2" != in-favour; then
90
 
        echo "$0: undocumented call to \`prerm $*'" 1>&2
91
 
        exit 0
92
 
      fi
93
 
      # We are being removed because of a conflict with package $3
94
 
      # (version $4), which is now being installed.
95
 
      :
96
 
 
97
 
    else
98
 
      # The package is being removed in its own right.
99
 
      :
100
 
 
101
 
    fi ;;
102
 
  deconfigure)
103
 
    if test "$2" != in-favour || test "$5" != removing; then
104
 
      echo "$0: undocumented call to \`prerm $*'" 1>&2
105
 
      exit 0
106
 
    fi
107
 
    # Package $6 (version $7) which we depend on is being removed due
108
 
    # to a conflict with package $3 (version $4), and this package is
109
 
    # being deconfigured until $6 can be reinstalled.
110
 
    :
111
 
 
112
 
    ;;
113
 
  upgrade)
114
 
    # Prepare to upgrade FROM THIS VERSION of this package to version $2.
115
 
    :
116
 
 
117
 
    if [ -L /usr/doc/$package_name ]; then
118
 
        rm -f /usr/doc/$package_name
119
 
    fi
120
 
 
121
 
    ;;
122
 
  failed-upgrade)
123
 
    # Prepare to upgrade from version $2 of this package TO THIS VERSION.
124
 
    # This is only used if the old version's prerm couldn't handle it,
125
 
    # and returned non-zero.  (Fix old prerm bugs here.)
126
 
    :
127
 
 
128
 
    ;;
129
 
  *) echo "$0: didn't understand being called with \`$1'" 1>&2
130
 
     exit 0;;
131
 
esac
132
 
 
133
 
exit 0