tags #389765 confirmed pending
thanks

On Sat, Sep 30, 2006 at 11:25:00AM +0200, Vincent Zweije wrote:
> Attached patch should fix the problems.

Thanks for helping.

> diff -rud ippl-1.4.14-7/debian/postinst ippl-1.4.14-7.1/debian/postinst
> --- ippl-1.4.14-7/debian/postinst     2006-09-29 17:30:03.000000000 +0200
> +++ ippl-1.4.14-7.1/debian/postinst   2006-09-30 11:03:35.489255638 +0200
> @@ -20,9 +20,13 @@
>  
>  # Add user
>  if [ "$1" = "configure" ]; then
> -    echo >&2 'Adding system user'
> -    adduser --system --group --home /var/run/ippl \
> -            --disabled-login --force-badname $USERNAME
> +    if ! id -u $USERNAME >/dev/null 2>&1; then
> +        echo >&2 'Adding system user'
> +        adduser --system --group --home /var/run/ippl \
> +                --disabled-login --force-badname $USERNAME
> +    else
> +        echo >&2 "Re-using existing $USERNAME system user"
> +    fi
>  fi

I do not accept this patch as it replicates adduser features in the
maintainer scripts. adduser --system handles the case of the account
already existing in a graceful way.

> diff -rud ippl-1.4.14-7/debian/postrm ippl-1.4.14-7.1/debian/postrm
> --- ippl-1.4.14-7/debian/postrm       2006-09-29 17:30:03.000000000 +0200
> +++ ippl-1.4.14-7.1/debian/postrm     2006-09-30 11:05:42.597082978 +0200
> @@ -7,9 +7,11 @@
>  #DEBHELPER#
>  
>  if [ "$1" = "purge" ]; then
> -     rm -rf /var/log/ippl
> -     
> -     echo >&2 'Removing system user'
> -     deluser --home $HOMEDIR --system $USERNAME
> -     rm -rf $HOMEDIR
> +    rm -rf /var/log/ippl
> +
> +    if which deluser >/dev/null; then
> +        echo >&2 'Removing system user'
> +        deluser --system $USERNAME
> +        rm -rf $HOMEDIR
> +    fi
>  fi

I am invoking deluser --remove-home now from postinst:
        if command -v deluser >/dev/null; then
          echo >&2 'Removing system user'
          deluser --remove-home --system $USERNAME
        else
          echo >&2 'Not removing system user, deluser not found'
        fi

The change is committed to svn.

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 72739835


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to