all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH installer] install: set timezone, before configuring postfix
@ 2025-08-05 21:36 Stoiko Ivanov
  2025-08-06 10:47 ` Hannes Duerr
  2025-08-08 13:18 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 2 replies; 3+ messages in thread
From: Stoiko Ivanov @ 2025-08-05 21:36 UTC (permalink / raw)
  To: pve-devel

quite a few changes have been made to the postfix package in trixie.
one of those is that `configure-instance.sh`, which handles
chroot-creation is now called on service startup and e.g. with
`postfix check`, which we run here[0].

this results in /etc/localtime being copied into the changeroot
before we set it to the timezone configured by the installer,
resulting in a warning upon rebooting (which would remain
until you either `dpkg-reconfigure tzdata` or `touch /etc/localtime`.

[0] https://salsa.debian.org/postfix-team/postfix-dev/-/commit/6a3cfe2931138898bea99b171c3731b17ee2fbae
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
tested minimally with a current PBS iso - the postfix warnings after
rebooting were gone for me.
 Proxmox/Install.pm | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Proxmox/Install.pm b/Proxmox/Install.pm
index 706f7fd..9cb88bc 100644
--- a/Proxmox/Install.pm
+++ b/Proxmox/Install.pm
@@ -1295,6 +1295,12 @@ _EOD
             },
         );
 
+        # set timezone
+        my $timezone = Proxmox::Install::Config::get_timezone();
+        unlink("$targetdir/etc/localtime");
+        symlink("/usr/share/zoneinfo/$timezone", "$targetdir/etc/localtime");
+        file_write_all("$targetdir/etc/timezone", "$timezone\n");
+
         unlink "$targetdir/etc/mailname";
         $postfix_main_cf =~ s/__FQDN__/${hostname}.${domain}/;
         file_write_all("$targetdir/etc/postfix/main.cf", $postfix_main_cf);
@@ -1309,12 +1315,6 @@ _EOD
         unlink "$targetdir/proxmox_install_mode";
 
         my $country = Proxmox::Install::Config::get_country();
-        my $timezone = Proxmox::Install::Config::get_timezone();
-
-        # set timezone
-        unlink("$targetdir/etc/localtime");
-        symlink("/usr/share/zoneinfo/$timezone", "$targetdir/etc/localtime");
-        file_write_all("$targetdir/etc/timezone", "$timezone\n");
 
         # set apt mirror
         if (my $mirror = $iso_env->{locales}->{country}->{$country}->{mirror}) {
-- 
2.39.5



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


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

end of thread, other threads:[~2025-08-08 13:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-05 21:36 [pve-devel] [PATCH installer] install: set timezone, before configuring postfix Stoiko Ivanov
2025-08-06 10:47 ` Hannes Duerr
2025-08-08 13:18 ` [pve-devel] applied: " Thomas Lamprecht

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