~davidc3/unity-lens-video/checkbox-tests

« back to all changes in this revision

Viewing changes to debian/checkbox-unity.postrm

  • Committer: Marc Tardif
  • Date: 2011-11-28 22:59:10 UTC
  • Revision ID: marc.tardif@canonical.com-20111128225910-5ipiwiu90vgedyhh
Initial release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh -e
 
2
 
 
3
name=`basename $0 .postrm`
 
4
base=`echo $name | cut -d "-" -f "1"`
 
5
file="/etc/$base.d/$name.ini"
 
6
 
 
7
case "$1" in
 
8
    purge)
 
9
        # mimic dpkg as closely as possible, so remove configuration
 
10
        # files with dpkg backup extensions too:
 
11
        for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist;  do
 
12
            rm -f $file$ext
 
13
        done
 
14
 
 
15
        # remove the configuration file itself
 
16
        rm -f $file
 
17
 
 
18
        # and finally clear it out from the ucf database
 
19
        ucf --purge $file
 
20
        ;;
 
21
    remove|disappear|upgrade|failed-upgrade|abort-install|abort-upgrade)
 
22
        ;;
 
23
    *)
 
24
        echo "$0: didn't understand being called with \`$1'" 1>&2
 
25
        exit 0
 
26
        ;;
 
27
esac
 
28
 
 
29
#DEBHELPER#