]> git.proxmox.com Git - pve-installer.git/commitdiff
fetch answers: rename partition search label
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 19 Apr 2024 13:14:27 +0000 (15:14 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 22 Apr 2024 12:31:37 +0000 (14:31 +0200)
The new one is far from perfect either, but labels can be at max 16
characters, so that's what we have to work with.

It now is slightly easier to read due to the hyphen separation and
contains the following relevant info:
- proxmox spelled out in full, so anybody seeing that label has a good
  chance to narrow down what it could do already by a lot
- inst is a bit cryptic, but that Proxmox has a installer is a easy to
  find out fact
- src should hopefully relay that this is the source of
  (configuration) for something related to a installer by proxmox

But yeah, please don't limit IDs or names to less than 32, ideally
even 64, characters, that's the bare minimum to get some expressive
names that can have actual meaning..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
proxmox-auto-install-assistant/src/main.rs
proxmox-fetch-answer/src/fetch_plugins/partition.rs

index 34341c6e47e77fb59389a481920efe36a5dcefd4..b42c27da5f92be657f1765aad719864f65d52aa0 100644 (file)
@@ -92,17 +92,17 @@ struct CommandValidateAnswer {
 /// Prepare an ISO for automated installation.
 ///
 /// The final ISO will try to fetch an answer file automatically. It will first search for a
-/// partition / file-system called "PROXMOXINST" (or lowercase) and a file in the root named
+/// partition / file-system called "PROXMOX-INST-SRC" (or lowercase) and a file in the root named
 /// "answer.toml".
 ///
 /// If that is not found, it will try to fetch an answer file via an HTTP Post request. The URL for
 /// it can be defined for the ISO with the '--url', '-u' argument. If not present, it will try to
-/// get a URL from a DHCP option (250, TXT) or as a DNS TXT record at 'proxmoxinst.{search
-/// domain}'.
+/// get a URL from a DHCP option (250, TXT) or by querying a DNS TXT record at
+/// 'proxmox-auto-installer.{search domain}'.
 ///
 /// The TLS certificate fingerprint can either be defined via the '--cert-fingerprint', '-c'
 /// argument or alternatively via the custom DHCP option (251, TXT) or in a DNS TXT record located
-/// at 'proxmoxinst-fp.{search domain}'.
+/// at 'proxmox-auto-installer-cert-fingerprint.{search domain}'.
 ///
 /// The latter options to provide the TLS fingerprint will only be used if the same method was used
 /// to retrieve the URL. For example, the DNS TXT record for the fingerprint will only be used, if
@@ -112,8 +112,9 @@ struct CommandValidateAnswer {
 /// The behavior of how to fetch an answer file can be overridden with the '--install-mode', '-i'
 /// parameter. The answer file can be{n}
 /// * integrated into the ISO itself ('included'){n}
-/// * needs to be present in a partition / file-system called 'PROXMOXINST' ('partition'){n}
-/// * only be requested via an HTTP Post request ('http').
+/// * needs to be present in a partition / file-system with the label 'PROXMOX-INST-SRC'
+///   ('partition'){n}
+/// * get requested via an HTTP Post request ('http').
 #[derive(Args, Debug)]
 struct CommandPrepareISO {
     /// Path to the source ISO
index 1d7d78749ee56931b837d303178669991df6f456..6993709a712ab074415381bd0138da7d245a3d66 100644 (file)
@@ -8,7 +8,7 @@ use std::{
 
 static ANSWER_FILE: &str = "answer.toml";
 static ANSWER_MP: &str = "/mnt/answer";
-static PARTLABEL: &str = "proxmoxinst";
+static PARTLABEL: &str = "proxmox-inst-src";
 static SEARCH_PATH: &str = "/dev/disk/by-label";
 
 pub struct FetchFromPartition;
@@ -61,7 +61,8 @@ fn scan_partlabels(partlabel_source: &str, search_path: &str) -> Result<PathBuf>
     )))
 }
 
-/// Will search and mount a partition/FS labeled proxmoxinst in lower or uppercase to ANSWER_MP;
+/// Will search and mount a partition/FS labeled PARTLABEL (proxmox-inst-src) in lower or uppercase
+/// to ANSWER_MP
 fn mount_proxmoxinst_part() -> Result<String> {
     if let Ok(true) = check_if_mounted(ANSWER_MP) {
         info!("Skipping: '{ANSWER_MP}' is already mounted.");