[pve-devel] [PATCH installer] common: fix deserialization of install config
Christoph Heiss
c.heiss at proxmox.com
Tue Nov 19 12:08:44 CET 2024
We serialize it as an integer for perl compatibility, so we need to also
deserialize it as such .. the latter is used in proxmox-chroot.
Otherwise, an auto-installation will fail at the end, when a
post-installation webhook is configured, while trying to run the
proxmox-chroot tool.
Reported-by: Timothy Nicholson <t.nicholson at proxmox.com>
Signed-off-by: Christoph Heiss <c.heiss at proxmox.com>
---
proxmox-installer-common/src/setup.rs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/proxmox-installer-common/src/setup.rs b/proxmox-installer-common/src/setup.rs
index fefedf6..1a9a71c 100644
--- a/proxmox-installer-common/src/setup.rs
+++ b/proxmox-installer-common/src/setup.rs
@@ -473,7 +473,10 @@ pub struct InstallRootPassword {
#[derive(Clone, Default, Deserialize, Serialize)]
pub struct InstallFirstBootSetup {
- #[serde(serialize_with = "serialize_bool_as_u32")]
+ #[serde(
+ serialize_with = "serialize_bool_as_u32",
+ deserialize_with = "deserialize_bool_from_int"
+ )]
pub enabled: bool,
#[serde(skip_serializing_if = "Option::is_none")]
pub ordering_target: Option<String>,
--
2.47.0
More information about the pve-devel
mailing list