[pve-devel] [PATCH common] debian/postinst: check for existing /etc/aliases

Stoiko Ivanov s.ivanov at proxmox.com
Fri Jun 12 11:15:38 CEST 2020


sorry - forgot (again :/ ) to add the bugreference:
fix #2796

On Fri, 12 Jun 2020 11:14:38 +0200
Stoiko Ivanov <s.ivanov at proxmox.com> wrote:

> Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
> ---
> Tested by installing libpve-common-perl=6.0-4 on a buster system w/o
> /etc/aliases and then installing one with this patch applied (and the
> libproxmox-acme-perl dependency removed).
> debian/postinst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/debian/postinst b/debian/postinst
> index 5a19c69..7bd635a 100644
> --- a/debian/postinst
> +++ b/debian/postinst
> @@ -9,7 +9,7 @@ case "$1" in
>      if test -n "$2"; then
>  
>          # TODO: remove once PVE 7.0 is released
> -        if dpkg --compare-versions "$2" 'lt' '6.0-5'; then
> +        if dpkg --compare-versions "$2" 'lt' '6.0-5' && [ -e /etc/aliases ]; then
>              sed -E -i -e 's/^www:(\w)/www: \1/' /etc/aliases
>         fi
>      fi





More information about the pve-devel mailing list