Files
zosbuilder/config/zinit/init/network.sh
Jan De Landtsheer fe8c48a862
Some checks failed
Build Zero OS Initramfs / build (push) Has been cancelled
Build Zero OS Initramfs / test-matrix (qemu, basic) (push) Has been cancelled
Build Zero OS Initramfs / test-matrix (qemu, serial) (push) Has been cancelled
sync: apply remote flist fallback, passwordless root finalize, path normalization, INITRAMFS_ARCHIVE guard, /home ensure, and notes
2025-09-09 21:24:28 +02:00

8 lines
447 B
Bash
Executable File

#!/bin/sh
set -e
# Ensure dhcpcd user/group exist (some builds expect to drop privileges)
if ! getent group dhcpcd >/dev/null 2>&1; then addgroup -S dhcpcd 2>/dev/null || true; fi
if ! getent passwd dhcpcd >/dev/null 2>&1; then adduser -S -D -s /sbin/nologin -G dhcpcd dhcpcd 2>/dev/null || true; fi
# Exec dhcpcd (will run as root if it cannot drop to dhcpcd user)
interfaces=$(ip -br l | awk '!/lo/&&!/my0/{print $1}')
exec dhcpcd -B $interfaces