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

  • Committer: Teddy Hogeborn
  • Date: 2009-04-16 10:41:41 UTC
  • Revision ID: teddy@fukt.bsnet.se-20090416104141-19m1kqbwr5v1q416
Code cleanup.

* mandos: Move some global stuff into classes.
  (server, group): Moved into "AvahiService".  All users changed.
  (AvahiService.group, AvahiService.server): New attributes.
  (entry_group_state_changed, server_state_changed): Moved into
                                                     "AvahiService".
                                                     All callers
                                                     changed.
  (AvahiService.cleanup, AvahiService.activate): New.
  (_datetime_to_dbus): Moved into "ClientDBus".  All callers changed.
  (ClientDBus._datetime_to_dbus): New.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash -e
 
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
 
. /usr/share/debconf/confmodule
19
 
 
20
18
# Update the initial RAM file system image
21
19
update_initramfs()
22
20
{
28
26
# Add user and group
29
27
add_mandos_user(){
30
28
    # Rename old "mandos" user and group
31
 
    case "$(getent passwd mandos)" in
 
29
    case "`getent passwd mandos`" in
32
30
        *:Mandos\ password\ system,,,:/nonexistent:/bin/false)
33
31
            usermod --login _mandos mandos
34
32
            groupmod --new-name _mandos mandos
64
62
        ;;
65
63
 
66
64
    *)
67
 
        echo "$0 called with unknown argument \`$1'" 1>&2
 
65
        echo "$0 called with unknown argument '$1'" 1>&2
68
66
        exit 1
69
67
        ;;
70
68
esac