all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pmg-devel] [PATCH pmg-api master v2] config: silence ENOENT when comparing SMTP filter config
@ 2025-09-23 11:09 Max R. Carrara
  2025-09-23 19:13 ` [pmg-devel] applied: " Stoiko Ivanov
  0 siblings, 1 reply; 2+ messages in thread
From: Max R. Carrara @ 2025-09-23 11:09 UTC (permalink / raw)
  To: pmg-devel

If `/run/pmg-smtp-filter.cfg` doesn't yet exist when `pmgsync.service`
runs, a "No such file or directory" warning is logged. While this has
been around since a while [0], the warning might look suspicious to
some (as it did to me during testing).

Therefore, silence the warning if there's an ENOENT.

[0]: https://git.proxmox.com/?p=pmg-api.git;a=commitdiff;h=e5b31a6178118981e784b225941f1502ba644ee5

Signed-off-by: Max R. Carrara <m.carrara@proxmox.com>
---
 src/PMG/Config.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PMG/Config.pm b/src/PMG/Config.pm
index 44e5463..20168ac 100644
--- a/src/PMG/Config.pm
+++ b/src/PMG/Config.pm
@@ -1910,7 +1910,7 @@ sub compare_smtp_filter_config {
     eval { $old = PVE::Tools::file_get_contents($smtp_filter_cfg); };
 
     if (my $err = $@) {
-        syslog('warning', "reloading pmg-smtp-filter: $err");
+        syslog('warning', "reloading pmg-smtp-filter: $err") if !$!{ENOENT};
         $ret = 1;
     } else {
         my $new = $self->dump_smtp_filter_config();
-- 
2.47.3



_______________________________________________
pmg-devel mailing list
pmg-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-09-23 19:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-23 11:09 [pmg-devel] [PATCH pmg-api master v2] config: silence ENOENT when comparing SMTP filter config Max R. Carrara
2025-09-23 19:13 ` [pmg-devel] applied: " Stoiko Ivanov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal