From 246f127773839b650ce73c442dd0124a7202bdbf Mon Sep 17 00:00:00 2001 From: iceBear67 Date: Mon, 22 Jun 2026 13:08:49 +0800 Subject: [PATCH] try odhcpd --- image/build-image.sh | 4 ++-- image/overlay/etc/network/interfaces | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/image/build-image.sh b/image/build-image.sh index 1504d7d..369b595 100755 --- a/image/build-image.sh +++ b/image/build-image.sh @@ -1,6 +1,6 @@ #!/bin/sh IMAGE_NAME="${IMAGE_NAME:=alpine-vm}" -IMAGE_SIZE="${IMAGE_SIZE:-1G}" +IMAGE_SIZE="${IMAGE_SIZE:-512M}" IMAGE_FORMAT="${IMAGE_FORMAT:=raw}" ALPINE_BRANCH="${ALPINE_BRANCH:=latest-stable}" KERNEL_FLAVOR="${KERNEL_FLAVOR:=virt}" @@ -31,7 +31,7 @@ alpine-make-vm-image \ --fs-skel-dir "$OVERLAY_DIR" \ --fs-skel-chown root:root \ --script-chroot \ - --packages "git curl docker cronie dhcpcd" \ + --packages "git curl docker cronie" \ "$IMAGE_FILE" \ "$CONFIGURE_SH" | tee $TMP diff --git a/image/overlay/etc/network/interfaces b/image/overlay/etc/network/interfaces index d83a145..790f947 100644 --- a/image/overlay/etc/network/interfaces +++ b/image/overlay/etc/network/interfaces @@ -2,9 +2,5 @@ auto lo iface lo inet loopback auto eth0 -iface eth0 inet manual - pre-up ip link set dev eth0 up - up dhcpcd --nobackground --ipv4only --waitip=4 eth0 - - down dhcpcd --release eth0 - post-down ip link set dev eth0 down +iface eth0 inet dhcp + post-up ip route del default || true; ip route add default via GATEWAY_ADDRESS