/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.postinst

  • Committer: Teddy Hogeborn
  • Date: 2009-02-13 05:38:21 UTC
  • Revision ID: teddy@fukt.bsnet.se-20090213053821-03e696gckk4nbjps
Support not using IPv6 in server:

* mandos (AvahiService.__init__): Take new "protocol" parameter.  All
                                  callers changed.
  (IPv6_TCPServer.__init__): Take new "use_ipv6" parameter.  All
                             callers changed.
  (IPv6_TCPServer.server_bind): Create IPv4 socket if not using IPv6.
  (main): New "--no-ipv6" command line option.  New "use_ipv6" config
          option.
* mandos-options.xml ([@id="address"]): Document conditional IPv4
                                        address support.
  ([@id="ipv6"]): New paragraph.
* mandos.conf (use_ipv6): New config option.
* mandos.conf.xml (OPTIONS): Document new "use_dbus" option.
  (EXAMPLE): Changed to use IPv6 link-local address.  Added "use_ipv6"
             option.
* mandos.xml (SYNOPSIS): New "--no-ipv6" option.
  (OPTIONS): Document new "--no-ipv6" option.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
 
1
#!/bin/sh -e
2
2
# This script can be called in the following ways:
3
3
#
4
4
# After the package was installed:
15
15
# If prerm fails during replacement due to conflict:
16
16
#       <postinst> abort-remove in-favour <new-package> <version>
17
17
 
18
 
set -e
19
 
 
20
18
case "$1" in
21
19
    configure)
22
20
        # Rename old "mandos" user and group
23
 
        if dpkg --compare-versions "$2" lt "1.0.3-1"; then
24
 
            case "`getent passwd mandos`" in
25
 
                *:Mandos\ password\ system,,,:/nonexistent:/bin/false)
26
 
                    usermod --login _mandos mandos
27
 
                    groupmod --new-name _mandos mandos
28
 
                    ;;
29
 
            esac
30
 
        fi
 
21
        case "`getent passwd mandos`" in
 
22
            *:Mandos\ password\ system,,,:/nonexistent:/bin/false)
 
23
                usermod --login _mandos mandos
 
24
                groupmod --new-name _mandos mandos
 
25
                ;;
 
26
        esac
31
27
        # Create new user and group
32
28
        if ! getent passwd _mandos >/dev/null; then
33
29
            adduser --system --force-badname --quiet \