From 8260f0438907ad0ab51ef9f0d27b21d9a9520e89 Mon Sep 17 00:00:00 2001 From: Maarten Date: Wed, 18 Feb 2026 14:18:37 +0100 Subject: [PATCH] bugfix --- incusos/README.md | 2 +- incusos/examples/incus-standalone.yaml | 2 +- incusos/incusos-iso | 23 +++++++++++++++++++++-- incusos/incusos-seed | 22 +++++++++++++++++++--- 4 files changed, 42 insertions(+), 7 deletions(-) diff --git a/incusos/README.md b/incusos/README.md index aca2d32..570d405 100644 --- a/incusos/README.md +++ b/incusos/README.md @@ -129,7 +129,7 @@ Customize with `--batch-arches` and `--batch-apps`: Generates IncusOS seed archives containing the YAML configuration files that customize an IncusOS installation. Output can be: -- **tar archive** (default) -- for use with `flasher-tool --seed-tar` +- **tar archive** (default) -- for use with `flasher-tool --seed` - **FAT image** -- for use as an external SEED_DATA partition/disk ### Quick Start diff --git a/incusos/examples/incus-standalone.yaml b/incusos/examples/incus-standalone.yaml index 5265bf9..9a325d5 100644 --- a/incusos/examples/incus-standalone.yaml +++ b/incusos/examples/incus-standalone.yaml @@ -11,7 +11,7 @@ # # Usage with flasher-tool (place files in a tar archive): # tar -cf seed.tar install.yaml applications.yaml incus.yaml -# flasher-tool --seed-tar seed.tar +# flasher-tool --seed seed.tar # --- install.yaml --- # force_install: true diff --git a/incusos/incusos-iso b/incusos/incusos-iso index 2205d58..c29adae 100755 --- a/incusos/incusos-iso +++ b/incusos/incusos-iso @@ -481,6 +481,7 @@ detect_client_cert() { success "Certificate obtained from Incus CLI" return fi + detail "Incus CLI available but could not retrieve certificate" fi # Try common file locations @@ -498,7 +499,25 @@ detect_client_cert() { fi done - warn "No client certificate found -- image will require manual certificate setup" + # Determine how serious the missing cert is + if [[ "$APP" == "operations-center" ]]; then + error "No client certificate found" + error "Operations Center requires at least one trusted certificate for access" + error "" + error "Options:" + error " --cert FILE Provide a certificate file" + error " Install the Incus client: sudo apt install incus-client" + error " --no-cert Skip certificate (you will be locked out!)" + exit 1 + fi + + warn "No client certificate found" + if ! command -v incus &>/dev/null; then + warn "The Incus client is not installed on this machine" + warn "Install it to enable auto-detection: sudo apt install incus-client" + fi + warn "The installed system will require manual certificate trust setup" + warn "Use --cert FILE to provide a certificate, or --no-cert to suppress this warning" } # --------------------------------------------------------------------------- @@ -761,7 +780,7 @@ build_single() { # Build flasher-tool command local cmd=("$FLASHER_TOOL") cmd+=(--format "$format") - cmd+=(--seed-tar "$seed_tar") + cmd+=(--seed "$seed_tar") cmd+=(--channel "$CHANNEL") if [[ "$needs_download" == true ]]; then diff --git a/incusos/incusos-seed b/incusos/incusos-seed index 654dae9..9bc5b69 100755 --- a/incusos/incusos-seed +++ b/incusos/incusos-seed @@ -77,7 +77,7 @@ ${BOLD}OPTIONS${RESET} ${BOLD}Output options:${RESET} ${BOLD}-f, --format${RESET} FORMAT Output format: ${CYAN}tar${RESET}, ${CYAN}fat${RESET} (default: tar) - tar: for use with flasher-tool --seed-tar + tar: for use with flasher-tool --seed fat: FAT image with SEED_DATA label for external media ${BOLD}--fat-size${RESET} SIZE FAT image size in MiB (default: 10) @@ -353,9 +353,25 @@ detect_client_cert() { fi done + # Determine how serious the missing cert is + if [[ "$APP" == "operations-center" ]]; then + error "No client certificate found" + error "Operations Center requires at least one trusted certificate for access" + error "" + error "Options:" + error " --cert FILE Provide a certificate file" + error " Install the Incus client: sudo apt install incus-client" + error " --no-cert Skip certificate (you will be locked out!)" + exit 1 + fi + warn "No client certificate found" + if ! command -v incus &>/dev/null; then + warn "The Incus client is not installed on this machine" + warn "Install it to enable auto-detection: sudo apt install incus-client" + fi warn "The installed system will require manual certificate trust setup" - warn "Use --cert FILE to specify a certificate, or --no-cert to suppress this warning" + warn "Use --cert FILE to provide a certificate, or --no-cert to suppress this warning" } # --------------------------------------------------------------------------- @@ -638,7 +654,7 @@ print_summary() { if [[ "$FORMAT" == "tar" ]]; then echo -e "${DIM} Use with flasher-tool:${RESET}" - echo -e " flasher-tool --seed-tar ${OUTPUT}" + echo -e " flasher-tool --seed ${OUTPUT}" elif [[ "$FORMAT" == "fat" ]]; then echo -e "${DIM} Attach as secondary disk/ISO to the VM.${RESET}" echo -e "${DIM} IncusOS will detect the SEED_DATA label at boot.${RESET}"