fix: genapkovl copy to /var/tmp, udhcpc background mode

This commit is contained in:
2026-03-05 16:17:52 +03:00
parent 40815161fe
commit 279ef318e1
5 changed files with 7 additions and 8 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

BIN
iso/.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -103,7 +103,9 @@ rm -rf /var/tmp/bee-iso-work
# Run from /var/tmp to avoid git repo context conflicts and to ensure enough scratch space.
# mkinitfs/update-kernel use TMPDIR for initramfs build; tmpfs /tmp is only ~1GB.
# mkimage.sh sources genapkovl-*.sh from CWD (not from ~/.mkimage), so copy it here too.
export TMPDIR=/var/tmp
cp "${BUILDER_DIR}/genapkovl-bee_debug.sh" /var/tmp/
cd /var/tmp
sh /usr/share/aports/scripts/mkimage.sh \
--tag "v${ALPINE_VERSION}" \

View File

@@ -85,7 +85,7 @@ mkdir -p "$tmp/etc/dropbear" "$tmp/etc/conf.d"
# -R: auto-generate host keys if missing
# no dependency on networking service — bee-network handles DHCP independently
makefile root:root 0644 "$tmp/etc/conf.d/dropbear" <<EOF
DROPBEAR_OPTS="-R"
DROPBEAR_OPTS="-R -B"
EOF

View File

@@ -22,13 +22,10 @@ for iface in $interfaces; do
log "bringing up $iface"
ip link set "$iface" up 2>/dev/null || { log "WARN: could not bring up $iface"; continue; }
# DHCP: 3 retries, 5s timeout per try, exit without blocking if no offer
if udhcpc -i "$iface" -t 3 -T 5 -n -q 2>/dev/null; then
IP=$(ip -4 addr show "$iface" | awk '/inet /{print $2}' | head -1)
log "OK: $iface got $IP"
else
log "WARN: $iface — no DHCP offer"
fi
# DHCP: run in background (-b) so udhcpc persists and retries when cable is connected later.
# -t 0: unlimited retries, -T 3: 3s per attempt.
udhcpc -i "$iface" -b -t 0 -T 3 -q 2>/dev/null &
log "DHCP started for $iface (background, will retry until lease acquired)"
done
log "done"