From f006465dd284560e59eef562158a9ff5a035aba4 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Thu, 20 Oct 2016 13:10:23 +0300 Subject: init: make network boot work without apkovl --- initramfs-init.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'initramfs-init.in') diff --git a/initramfs-init.in b/initramfs-init.in index 8b5ca40..1a1adab 100755 --- a/initramfs-init.in +++ b/initramfs-init.in @@ -169,7 +169,7 @@ ip_set() { # "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 @@ -527,6 +527,9 @@ cp -a /etc/apk/keys $sysroot/etc/apk # 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 apk_arch="$(apk --print-arch)" -- cgit v1.2.3