Adding side stream changes to Maemian. Working to integrate full upstream libraries...
[maemian] / nokia-lintian / testset / maintainer-scripts / debian / postrm
1 #!/bin/bash
2
3 update-alternatives --remove dummy /usr/bin/dummy-alternative
4
5 # Normally read in a maintainer script is not kosher, but here we're going
6 # to do it only if debconf doesn't exist.
7 if ! test -f /usr/share/debconf/confmodule ; then
8     echo "Hit enter"
9     read
10 fi
11
12 # neither of the following should be detected as postrm-unsafe-ldconfig
13 # intended, without quotes
14    if [ "$1" = remove ]; then
15        ldconfig
16     fi
17 # reversed, many whitespace
18 if [ 'remove' = "$1" ]
19 then
20  
21  ldconfig
22 fi
23
24 [ "remove" ="$1" ] && ldconfig
25
26 update-rc.d bar remove
27
28 # Shouldn't provoke an error despite no invoke-rc.d.
29 echo "/etc/init.d/package stop to stop something"
30
31 # Shouldn't require a ucf dependency.  Unfortunately, right now that's
32 # just because postrm isn't checked, not because we ensure that the
33 # invocation is conditional.
34 if which ucf >/dev/null; then
35     ucf --purge /etc/foo.conf
36 fi    
37
38 # This isn't allowed.
39 rm /tmp/foo /dev/device
40 rm      /dev/device1
41
42 # But this is okay.
43 rm /tmp/foo > /dev/null
44
45 # Not allowed here even with remove.
46 install-sgmlcatalog --remove package