fail back for install

This commit is contained in:
Andrei Smaliak 2026-06-10 09:02:29 +04:00
parent 2033491069
commit a4d5497e5d
1 changed files with 12 additions and 2 deletions

View File

@ -994,7 +994,13 @@ ensure_edge_name
# Step 10: Cockpit baseline + security reminder
# -------------------------
step "Install + enable Cockpit baseline + security reminder"
apt_install_missing cockpit network-manager
apt_install_missing network-manager
if apt_install_missing cockpit; then
log "cockpit package ensured"
else
log "WARN: cockpit install failed; continuing without blocking stage_env"
echo "[!] WARN: cockpit install failed; continuing without it (see $LOG)"
fi
apt_install_optional cockpit-networkmanager cockpit-storaged
keep_pcp_logs_on_root
systemctl_enable_now_safe NetworkManager
@ -1038,7 +1044,11 @@ write_if_changed /etc/cockpit/cockpit.conf 0644 <<'EOF'
Banner=/etc/issue.cockpit
EOF
soft_run "Enable cockpit.socket" 60 /bin/systemctl enable --now cockpit.socket
if package_installed cockpit; then
soft_run "Enable cockpit.socket" 60 /bin/systemctl enable --now cockpit.socket
else
log "WARN: cockpit is not installed; skipped cockpit.socket enable"
fi
cat >/etc/motd <<EOF
======================================================