[pve-devel] [PATCH manager] Fix #1386: track postfix daemon status via postfix at -

Wolfgang Bumiller w.bumiller at proxmox.com
Wed May 17 13:48:50 CEST 2017


On Wed, May 17, 2017 at 11:54:12AM +0200, Emmanuel Kasper wrote:
> ---
>  PVE/API2/Services.pm | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/PVE/API2/Services.pm b/PVE/API2/Services.pm
> index 3ddf5f56..1cbfe2c5 100644
> --- a/PVE/API2/Services.pm
> +++ b/PVE/API2/Services.pm
> @@ -35,9 +35,16 @@ my $service_name_list = [
>      'systemd-timesyncd',
>      ];
>  
> +# since postfix package 3.1.0-3.1 the postfix unit is only here to
> +# manage subinstances, of which the  default is called "-".
> +# This is where we look for the daemon status
> +my $real_status = {

Maybe call this 'unit_names' instead.

There's also #1387: sshd vs ssh and ssh.service vs ssh.socket
Maybe this should accept arrays of services of which it finds the first
one with an active state?

> +    postfix => 'postfix at -'
> +};
> +
>  my $get_full_service_state = sub {
>      my ($service) = @_;
> -
> +    $service = $real_status->{$service} if $real_status->{$service};
>      my $res;
>      
>      my $parser = sub {
> -- 
> 2.11.0




More information about the pve-devel mailing list