/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

* debian/mandos-client.postinst (update_initramfs): Bug fix: typo.
                                                    Only change
                                                    permissions on
                                                    files.

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
# Update the initial RAM file system image
21
19
update_initramfs()
22
20
{
35
33
# Add user and group
36
34
add_mandos_user(){
37
35
    # Rename old "mandos" user and group
38
 
    if dpkg --compare-versions "$2" lt "1.0.3-1"; then
39
 
        case "`getent passwd mandos`" in
40
 
            *:Mandos\ password\ system,,,:/nonexistent:/bin/false)
41
 
                usermod --login _mandos mandos
42
 
                groupmod --new-name _mandos mandos
43
 
                return
44
 
                ;;
45
 
        esac
46
 
    fi
 
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
47
43
    # Create new user and group
48
44
    if ! getent passwd _mandos >/dev/null; then
49
45
        adduser --system --force-badname --quiet --home /nonexistent \