mirror of
https://github.com/CyberMind-FR/secubox-deb.git
synced 2026-07-29 09:14:33 +00:00
fix(round): restore ICON_PATHS /var/www/common + defense-in-depth icon copy
Some checks failed
License Headers / check (push) Failing after 6s
Some checks failed
License Headers / check (push) Failing after 6s
These two edits were on fix/round-real-root-icons (commit a5b312f7) but
got wiped by my earlier force-push to fix/round-armv6-boot-services.
Re-applying identically so v4 picks them up.
fallback_manager.py: add /var/www/common/assets/icons as the third
lookup path so the 6 brand icons (auth/wall/boot/mind/root/mesh) ship
via common/ are found. Without this, fallback_manager only sees the
round/-side placeholder set and can't render the canonical module
icons on the fallback radar.
build-eye-remote-image.sh: also copy common/assets/icons/*.png into
/usr/lib/secubox-eye/assets/icons/ (cp -n so placeholders aren't
overwritten when names collide — none do). Pure defense-in-depth.
This commit is contained in:
parent
9a0a9873a7
commit
8905228cbd
|
|
@ -93,10 +93,15 @@ LOGO_PATHS = [
|
|||
Path("/etc/secubox/eye-remote/assets/phoenix_logo.png"),
|
||||
]
|
||||
|
||||
# Icon paths - module icons
|
||||
# Icon paths - module icons.
|
||||
# Order matters: first existing path wins per icon name. /var/www/common/
|
||||
# holds the real brand icons (auth, wall, boot, mind, root, mesh) installed
|
||||
# by build-eye-remote-image.sh; the local /usr/lib/secubox-eye/assets/icons/
|
||||
# fallback path holds the round-specific placeholder set.
|
||||
ICON_PATHS = [
|
||||
Path("/tmp/assets/icons"),
|
||||
Path("/etc/secubox/eye-remote/assets/icons"),
|
||||
Path("/var/www/common/assets/icons"),
|
||||
Path(__file__).parent.parent.parent.parent / "assets" / "icons",
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -704,8 +704,19 @@ if [[ -f "$SCRIPT_DIR/secubox-eye-agent.service" && -f "$SCRIPT_DIR/config.toml.
|
|||
log "Installing menu system icons..."
|
||||
mkdir -p "$ROOT_MNT/usr/lib/secubox-eye/assets/icons"
|
||||
cp "$SCRIPT_DIR/assets/icons"/*.png "$ROOT_MNT/usr/lib/secubox-eye/assets/icons/" 2>/dev/null || true
|
||||
# Defense-in-depth: also drop the brand-icon PNGs (auth/wall/boot/
|
||||
# mind/root/mesh) from remote-ui/common/assets/icons/ so any consumer
|
||||
# that resolves icons via /usr/lib/secubox-eye/ finds them. The
|
||||
# fallback_manager also searches /var/www/common/assets/icons/
|
||||
# directly (where build copies common/ in another step) — this is
|
||||
# redundant shipping for resilience.
|
||||
_COMMON_ICONS="$(dirname "$SCRIPT_DIR")/common/assets/icons"
|
||||
if [[ -d "$_COMMON_ICONS" ]]; then
|
||||
cp -n "$_COMMON_ICONS"/*.png \
|
||||
"$ROOT_MNT/usr/lib/secubox-eye/assets/icons/" 2>/dev/null || true
|
||||
fi
|
||||
ICON_COUNT=$(ls "$ROOT_MNT/usr/lib/secubox-eye/assets/icons"/*.png 2>/dev/null | wc -l)
|
||||
log "Installed $ICON_COUNT menu icons"
|
||||
log "Installed $ICON_COUNT menu icons (round/ + common/ brand)"
|
||||
fi
|
||||
else
|
||||
warn "Eye Agent files not found, skipping installation"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user