ref: f006465dd284560e59eef562158a9ff5a035aba4
parent: 14361e7589675a8032485780173e1cc71de2132f
author: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
date: Thu Oct 20 08:10:23 CDT 2016
init: make network boot work without apkovl
--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -169,7 +169,7 @@
# "server-ip" and "hostname" are not supported here.
#
configure_ip() {
- [ -n "$KOPT_ip" ] || return
+ [ -z "$KOPT_ip" -o "$MAC_ADDRESS" ] && return
OIFS=$IFS
IFS=':'
eval set -- $KOPT_ip
@@ -526,6 +526,9 @@
# generate apk repositories file. needs to be done after relocation
find_boot_repositories > $repofile
+
+# set up network if needed
+[ "$ALPINE_REPO" ] && configure_ip
# silently fix apk arch in case the apkovl does not match
if [ -r "$sysroot"/etc/apk/arch ]; then