/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to debian/mandos.prerm

  • Committer: Teddy Hogeborn
  • Date: 2009-01-14 14:20:17 UTC
  • Revision ID: teddy@fukt.bsnet.se-20090114142017-84t4kfw56bsftjlo
Fixes for sscanf usage:

* plugin-runner.c (main): Parse numbers correctly and portably using
                          an intermediate "intmax_t".  Cast "pid_t" to
                          "intmax_t" before passing it to "printf()".
* plugins.d/mandos-client.c (main): Parse numbers correctly and
                                    portably using an intermediate
                                    "intmax_t".  Bug fix: cast
                                    "AvahiIfIndex" to "intmax_t" and
                                    use "PRIdMAX" instead of using
                                    "PRIu16", and use "PRIu16" to
                                    format port number.
* plugins.d/splashy.c (main): Parse numbers correctly and portably
                              using an intermediate "intmax_t".
* plugins.d/usplash.c (main): - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
 
1
#! /bin/sh
2
2
# prerm script for mandos
3
3
#
4
4
# see: dh_installdeb(1)
6
6
set -e
7
7
 
8
8
# summary of how this script can be called:
9
 
#        * <prerm> 'remove'
10
 
#        * <old-prerm> 'upgrade' <new-version>
11
 
#        * <new-prerm> 'failed-upgrade' <old-version>
12
 
#        * <conflictor's-prerm> 'remove' 'in-favour' <package> <new-version>
13
 
#        * <deconfigured's-prerm> 'deconfigure' 'in-favour'
14
 
#          <package-being-installed> <version> 'removing'
 
9
#        * <prerm> `remove'
 
10
#        * <old-prerm> `upgrade' <new-version>
 
11
#        * <new-prerm> `failed-upgrade' <old-version>
 
12
#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
 
13
#        * <deconfigured's-prerm> `deconfigure' `in-favour'
 
14
#          <package-being-installed> <version> `removing'
15
15
#          <conflicting-package> <version>
16
16
# for details, see /usr/share/doc/packaging-manual/
17
17
 
18
18
case "$1" in
19
19
    remove|deconfigure)
20
 
        invoke-rc.d mandos stop || :
 
20
        if [ -x /etc/init.d/mandos ]; then
 
21
                if [ -x /usr/sbin/invoke-rc.d ]; then
 
22
                        invoke-rc.d mandos stop
 
23
                else
 
24
                        /etc/init.d/mandos stop
 
25
                fi
 
26
        fi
21
27
        ;;
22
28
    upgrade|failed-upgrade)
23
29
        ;;
24
30
    *)
25
 
        echo "prerm called with unknown argument '$1'" >&2
 
31
        echo "prerm called with unknown argument \`$1'" >&2
26
32
        exit 0
27
33
    ;;
28
34
esac