mirror of
https://github.com/CyberMind-FR/secubox-deb.git
synced 2026-07-28 21:17:36 +00:00
fix(live-usb): Fix hanging boot services
- Add 10s timeout to secubox-cmdline.service - Add 5s timeout to netplan apply - Remove pipefail to allow graceful failures - Scripts now continue on non-critical errors Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
cbe43876a2
commit
ba02a422a2
|
|
@ -4,7 +4,7 @@
|
||||||
# Parses kernel parameters for SecuBox-specific options
|
# Parses kernel parameters for SecuBox-specific options
|
||||||
# Run early at boot before network configuration
|
# Run early at boot before network configuration
|
||||||
# ══════════════════════════════════════════════════════════════════
|
# ══════════════════════════════════════════════════════════════════
|
||||||
set -euo pipefail
|
set -u # Exit on undefined variables, but allow command failures
|
||||||
|
|
||||||
CMDLINE="${1:-/proc/cmdline}"
|
CMDLINE="${1:-/proc/cmdline}"
|
||||||
MARKER_DIR="/var/lib/secubox"
|
MARKER_DIR="/var/lib/secubox"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
# Detects board type and configures WAN/LAN interfaces accordingly
|
# Detects board type and configures WAN/LAN interfaces accordingly
|
||||||
# Supports: EspressoBin, MochaBin, x64 (VM/Bare-metal)
|
# Supports: EspressoBin, MochaBin, x64 (VM/Bare-metal)
|
||||||
# ══════════════════════════════════════════════════════════════════
|
# ══════════════════════════════════════════════════════════════════
|
||||||
set -euo pipefail
|
set -u # Exit on undefined variables, but allow command failures
|
||||||
|
|
||||||
SECUBOX_CONF="/etc/secubox/secubox.conf"
|
SECUBOX_CONF="/etc/secubox/secubox.conf"
|
||||||
NETPLAN_DIR="/etc/netplan"
|
NETPLAN_DIR="/etc/netplan"
|
||||||
|
|
@ -339,7 +339,8 @@ main() {
|
||||||
# Generate and apply netplan configuration
|
# Generate and apply netplan configuration
|
||||||
generate_netplan "$board" "$wan_iface" "$lan_ifaces" "$sfp_ifaces" "$mode"
|
generate_netplan "$board" "$wan_iface" "$lan_ifaces" "$sfp_ifaces" "$mode"
|
||||||
log "Applying netplan..."
|
log "Applying netplan..."
|
||||||
netplan apply 2>/dev/null || warn "netplan apply failed"
|
# Use timeout to prevent hanging
|
||||||
|
timeout 5 netplan apply 2>/dev/null || log "netplan apply skipped or failed"
|
||||||
ok "Network configuration applied (mode: $mode)"
|
ok "Network configuration applied (mode: $mode)"
|
||||||
;;
|
;;
|
||||||
test)
|
test)
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ After=local-fs.target
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
|
TimeoutStartSec=10s
|
||||||
ExecStart=/usr/sbin/secubox-cmdline-handler apply
|
ExecStart=/usr/sbin/secubox-cmdline-handler apply
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user