home: hub: mkinitfs

Download patch

ref: 5fc705baf54b1a0b8e35c22f0e4dd7fab0162aad
parent: b4ebbafc0a53288788e6e11ede0b185d71269235
author: Natanael Copa <ncopa@alpinelinux.org>
date: Mon Jan 18 03:25:33 CST 2016

init: set MAC_ADDRESS in the scope where $device exists

we need set MAC_ADDRESS where whi know $device, which is a local
variable.

--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -208,6 +208,7 @@
 		ip_set "$device" "$client_ip" "$netmask" "$gw_ip"
 		eend $?
 	fi
+	MAC_ADDRESS=$(cat /sys/class/net/$device/address)
 }
 
 # relocate mountpoint according given fstab
@@ -412,7 +413,6 @@
 	http://*|https://*|ftp://*)
 		configure_ip
 
-		MAC_ADDRESS=$(cat /sys/class/net/$device/address)
 		MACHINE_UUID=$(cat /sys/class/dmi/id/product_uuid)
 		url="${KOPT_apkovl/{MAC\}/$MAC_ADDRESS}"
 		url="${url/{UUID\}/$MACHINE_UUID}"