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.nichol...@proxmox.com>
Signed-off-by: Christoph Heiss <c.he...@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



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

Reply via email to