/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-08-30 02:49:46 UTC
  • Revision ID: teddy@fukt.bsnet.se-20090830024946-bfr985x8kmrep11j
* plugins.d/mandos-client.c (signal_received): New.
  (handle_sigterm): Save signal received.
  (main): Also set handler for SIGINT and SIGHUP.  If exiting due to
          signal, re-raise signal received instead of returning.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
# Add user and group
34
34
add_mandos_user(){
35
35
    # Rename old "mandos" user and group
36
 
    case "`getent passwd mandos`" in
37
 
        *:Mandos\ password\ system,,,:/nonexistent:/bin/false)
38
 
            usermod --login _mandos mandos
39
 
            groupmod --new-name _mandos mandos
40
 
            return
41
 
            ;;
42
 
    esac
 
36
    if dpkg --compare-versions "$2" lt "1.0.3-1"; then
 
37
        case "`getent passwd mandos`" in
 
38
            *:Mandos\ password\ system,,,:/nonexistent:/bin/false)
 
39
                usermod --login _mandos mandos
 
40
                groupmod --new-name _mandos mandos
 
41
                return
 
42
                ;;
 
43
        esac
 
44
    fi
43
45
    # Create new user and group
44
46
    if ! getent passwd _mandos >/dev/null; then
45
47
        adduser --system --force-badname --quiet --home /nonexistent \