From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-api 1/2] utils: fix service_aliases usage
Date: Wed, 30 Jun 2021 18:39:54 +0200 [thread overview]
Message-ID: <20210630163955.18639-2-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20210630163955.18639-1-s.ivanov@proxmox.com>
2 errors were introduced in 4f06ff8ac21baa5736060221191fb109e20d8e37:
* a typo in the postgresql service name
* it missed the other uses of the service_name hash, apart from the
lookup_real_service_name sub.
both fixed here
Reported-by: Martin Maurer <martin@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
src/PMG/Utils.pm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/PMG/Utils.pm b/src/PMG/Utils.pm
index 318c7b3..09999d8 100644
--- a/src/PMG/Utils.pm
+++ b/src/PMG/Utils.pm
@@ -717,7 +717,7 @@ sub lookup_real_service_name {
if ($alias eq 'postgres') {
my $pg_ver = get_pg_server_version();
- return "postgresl\@${pg_ver}-main";
+ return "postgresql\@${pg_ver}-main";
}
return $service_aliases->{$alias} // $alias;
@@ -735,7 +735,7 @@ sub get_full_service_state {
}
};
- $service = $service_aliases->{$service} // $service;
+ $service = lookup_real_service_name($service);
PVE::Tools::run_command(['systemctl', 'show', $service], outfunc => $parser);
return $res;
@@ -790,7 +790,7 @@ sub service_cmd {
$cmd = 'restart' if $cmd eq 'start';
}
- $service = $service_aliases->{$service} // $service;
+ $service = lookup_real_service_name($service);
PVE::Tools::run_command(['systemctl', $cmd, $service]);
};
--
2.20.1
next prev parent reply other threads:[~2021-06-30 16:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-30 16:39 [pmg-devel] [PATCH pmg-api 0/2] upgrade related bugfixes and improvements Stoiko Ivanov
2021-06-30 16:39 ` Stoiko Ivanov [this message]
2021-06-30 16:39 ` [pmg-devel] [PATCH pmg-api 2/2] config: freshclam: default to incremental downloads Stoiko Ivanov
2021-07-05 6:34 ` [pmg-devel] applied-series: [PATCH pmg-api 0/2] upgrade related bugfixes and improvements Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210630163955.18639-2-s.ivanov@proxmox.com \
--to=s.ivanov@proxmox.com \
--cc=pmg-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox