From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH installer] install: set timezone, before configuring postfix
Date: Tue, 5 Aug 2025 23:36:29 +0200 [thread overview]
Message-ID: <20250805213629.1108359-1-s.ivanov@proxmox.com> (raw)
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
next reply other threads:[~2025-08-05 21:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-05 21:36 Stoiko Ivanov [this message]
2025-08-06 10:47 ` Hannes Duerr
2025-08-08 13:18 ` [pve-devel] applied: " 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=20250805213629.1108359-1-s.ivanov@proxmox.com \
--to=s.ivanov@proxmox.com \
--cc=pve-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