summaryrefslogtreecommitdiffstats
path: root/core/rootfs/rootfs-stage31/data/init
diff options
context:
space:
mode:
Diffstat (limited to 'core/rootfs/rootfs-stage31/data/init')
-rwxr-xr-xcore/rootfs/rootfs-stage31/data/init9
1 files changed, 6 insertions, 3 deletions
diff --git a/core/rootfs/rootfs-stage31/data/init b/core/rootfs/rootfs-stage31/data/init
index ee33c247..9aa0eb06 100755
--- a/core/rootfs/rootfs-stage31/data/init
+++ b/core/rootfs/rootfs-stage31/data/init
@@ -28,9 +28,9 @@ mkdir -p /tmp /proc /sys /dev /run
echo "/sbin/hotplug" > "/proc/sys/kernel/hotplug"
bench_event "KERNEL" "Kernel initialized"
[ ! -d /sys/class ] && busybox mount -n -t sysfs sysfs /sys
-for id in $( cat /sys/devices/pci*/*/modalias ); do
- ACTION=add MODALIAS=$id /sbin/hotplug
-done &
+
+find /sys/devices/pci* -type f -name modalias -exec /sbin/hotplug --file {} \; &
+HOTPLUG=$!
# NOTE: busybox mount is only available through the busybox binary,
# the link had to be dropped, to prevent bugs in the stage32.
@@ -119,6 +119,9 @@ fi
[ $DEBUG -ge 4 ] && drop_shell "Requested Debug Shell: before network."
+# Wait for hotplug seeding to finish, so the nic will be there
+echo "Waiting for hotplug -s ..."
+wait "$HOTPLUG"
. "/inc/setup_network" || . "/inc/setup_network_retry" || drop_shell "Error setting up network"
bench_event "NETWORK" "Network up and running"