Steuerzeichen in Textanzeigen, veralteter Anmeldehinweis, Image-Name

Drei Dinge aus einem Bildschirmfoto des laufenden Systems:

1. In jeder Textanzeige standen rohe Steuerzeichen (^[[1mImage^[[0m).
   Die Farbvariablen werden beim Laden von common.sh einmal festgelegt -
   das NO_COLOR beim spaeteren Aufruf wirkte deshalb nicht mehr. Statt
   an jeder Aufrufstelle zu flicken, entfernt jetzt _ui_file die
   Sequenzen; das greift fuer ALLE Textanzeigen, auch die von ui_run.

2. Der Status nannte weiterhin "Erstlogin: admin@example.com /
   changeme". Diese Zugangsdaten gibt es seit NPM 2.15 nicht mehr -
   genau das war hier schon Thema. Er zeigt jetzt NPM_ADMIN_EMAIL, und
   weist darauf hin, wenn kein Konto hinterlegt ist.

3. Ein aus dem Tarball geladenes Image heisst nicht
   "localhost/checkmk/..." wie von mir dokumentiert, sondern
   "docker.io/checkmk/check-mk-enterprise:2.4.0p9" - Podman ergaenzt den
   unqualifizierten Namen aus dem Archiv um docker.io, obwohl es das
   Image dort nicht gibt. Beides in beiden Sprachfassungen
   richtiggestellt, mit dem Hinweis, dass das harmlos ist: lokal ist es
   da, "up" nutzt es, nur pullen liesse es sich so nicht - dafuer gibt
   es "image get".

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-20 19:08:43 +02:00
co-authored by Claude Opus 5
parent 4d2e234c36
commit 22331ff114
4 changed files with 38 additions and 5 deletions
+10 -2
View File
@@ -940,7 +940,7 @@ sudo ./scripts/cmk-manage.sh image load --file /root/check-mk-enterprise-2.3.0p2
``` ```
In allen drei Faellen ermittelt das Skript den **tatsaechlichen** Image-Namen In allen drei Faellen ermittelt das Skript den **tatsaechlichen** Image-Namen
(bei `load` z. B. `localhost/checkmk/check-mk-enterprise:2.3.0p23`) und traegt (bei `load` z. B. `docker.io/checkmk/check-mk-enterprise:2.4.0p9`) und traegt
ihn als `CMK_IMAGE` in die `.env` ein. Danach: ihn als `CMK_IMAGE` in die `.env` ein. Danach:
```bash ```bash
@@ -964,9 +964,17 @@ Bezugsweg sieht dieselbe Version völlig anders aus:
``` ```
docker.io/checkmk/check-mk-raw:2.3.0-latest (Docker Hub) docker.io/checkmk/check-mk-raw:2.3.0-latest (Docker Hub)
registry.checkmk.com/enterprise/check-mk-enterprise:2.3.0p9 (Registry) registry.checkmk.com/enterprise/check-mk-enterprise:2.3.0p9 (Registry)
localhost/checkmk/check-mk-enterprise:2.3.0p9 (aus Tarball geladen) docker.io/checkmk/check-mk-enterprise:2.4.0p9 (aus Tarball geladen)
``` ```
> **Der Name nach `image download` überrascht.** Der Tarball trägt intern den
> unqualifizierten Namen `checkmk/check-mk-enterprise:<version>`, und Podman
> ergänzt daraus beim Einspielen `docker.io/` – obwohl es das Image dort gar
> nicht gibt. Das ist richtig und stört nicht: das Image liegt lokal, `up`
> verwendet es. Nur **pullen** ließe es sich unter diesem Namen nicht. Fehlt es
> später einmal, holt `image get` es wieder über das Downloadportal – nicht
> über `podman pull`.
Deshalb hält `CMK_IMAGE` fest, was **wirklich gilt**. Gesetzt wird der Wert von Deshalb hält `CMK_IMAGE` fest, was **wirklich gilt**. Gesetzt wird der Wert von
`image pull`, `image download`, `image load` und `image use` – von Hand muss man `image pull`, `image download`, `image load` und `image use` – von Hand muss man
dort nichts eintragen. In der Oberfläche sind die drei Werte deshalb nicht dort nichts eintragen. In der Oberfläche sind die drei Werte deshalb nicht
+10 -2
View File
@@ -944,7 +944,7 @@ sudo ./scripts/cmk-manage.sh image load --file /root/check-mk-enterprise-2.3.0p2
``` ```
In all three cases the script determines the **actual** image name (for `load` In all three cases the script determines the **actual** image name (for `load`
typically `localhost/checkmk/check-mk-enterprise:2.3.0p23`) and writes it to typically `docker.io/checkmk/check-mk-enterprise:2.4.0p9`) and writes it to
`CMK_IMAGE` in `.env`. Afterwards: `CMK_IMAGE` in `.env`. Afterwards:
```bash ```bash
@@ -968,9 +968,17 @@ you obtained it, the very same version looks completely different:
``` ```
docker.io/checkmk/check-mk-raw:2.3.0-latest (Docker Hub) docker.io/checkmk/check-mk-raw:2.3.0-latest (Docker Hub)
registry.checkmk.com/enterprise/check-mk-enterprise:2.3.0p9 (registry) registry.checkmk.com/enterprise/check-mk-enterprise:2.3.0p9 (registry)
localhost/checkmk/check-mk-enterprise:2.3.0p9 (loaded from a tarball) docker.io/checkmk/check-mk-enterprise:2.4.0p9 (loaded from a tarball)
``` ```
> **The name after `image download` is surprising.** The tarball carries the
> unqualified name `checkmk/check-mk-enterprise:<version>` internally, and
> Podman expands that to `docker.io/` when loading – even though the image does
> not exist there. That is correct and harmless: the image is local and `up`
> uses it. It just could not be **pulled** under that name. Should it ever go
> missing, `image get` fetches it from the download portal again – not via
> `podman pull`.
So `CMK_IMAGE` records what **actually applies**. It is written by So `CMK_IMAGE` records what **actually applies**. It is written by
`image pull`, `image download`, `image load` and `image use` – you never have to `image pull`, `image download`, `image load` and `image use` – you never have to
type anything there by hand. In the interface the three values are therefore not type anything there by hand. In the interface the three values are therefore not
+6 -1
View File
@@ -1816,7 +1816,12 @@ cmd_status() {
printf ' Agent-Receiver : %s:8000\n' "$ip" printf ' Agent-Receiver : %s:8000\n' "$ip"
if npm_enabled; then if npm_enabled; then
printf ' Checkmk (ueber Proxy) : https://<FQDN>/%s/\n' "$CMK_SITE_ID" printf ' Checkmk (ueber Proxy) : https://<FQDN>/%s/\n' "$CMK_SITE_ID"
printf ' NGINX Proxy Manager : http://%s:%s/ (Erstlogin: admin@example.com / changeme)\n\n' "$ip" "${NPM_ADMIN_PORT:-81}" printf ' NGINX Proxy Manager : http://%s:%s/\n' "$ip" "${NPM_ADMIN_PORT:-81}"
if [ -n "${NPM_ADMIN_EMAIL:-}" ]; then
printf ' Anmeldung: %s\n\n' "$NPM_ADMIN_EMAIL"
else
printf ' %sKein Konto hinterlegt%s - NPM_ADMIN_EMAIL/-PASSWORD setzen\n\n' "$C_YEL" "$C_RST"
fi
else else
printf ' NGINX Proxy Manager : abgeschaltet\n' printf ' NGINX Proxy Manager : abgeschaltet\n'
printf ' Externer Proxy weiterleiten auf http://%s:5000\n\n' "$ip" printf ' Externer Proxy weiterleiten auf http://%s:5000\n\n' "$ip"
+12
View File
@@ -446,8 +446,20 @@ _ui_box() {
_ui_file() { _ui_file() {
ui_init ui_init
ui_term_size ui_term_size
# Farbige Ausgaben landen hier als rohe Steuerzeichen (^[[1m ...),
# weil dialog/whiptail sie nicht auswerten. Die Farbvariablen werden
# beim Laden dieser Datei einmal festgelegt - ein NO_COLOR beim
# spaeteren Aufruf wirkt also nicht mehr. Deshalb hier entfernen;
# das greift fuer JEDE Textanzeige.
local clean; clean="$(mktemp)"
sed -E 's/\x1b\[[0-9;]*[a-zA-Z]//g; s/\x1b\([AB012]//g' "$2" >"$clean" 2>/dev/null \
|| cp "$2" "$clean"
set -- "$1" "$clean"
"$UI_BIN" ${UI_EXTRA[@]+"${UI_EXTRA[@]}"} --backtitle "$UI_BACKTITLE" --title "$1" \ "$UI_BIN" ${UI_EXTRA[@]+"${UI_EXTRA[@]}"} --backtitle "$UI_BACKTITLE" --title "$1" \
--textbox "$2" $(( UI_ROWS - 2 )) $(( UI_COLS - 4 )) --textbox "$2" $(( UI_ROWS - 2 )) $(( UI_COLS - 4 ))
local rc=$?
rm -f "$clean"
return $rc
} }
# --------------------------------------------------------------------- # ---------------------------------------------------------------------