diff options
author | Simon Rettberg | 2019-04-16 15:05:50 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-04-16 15:05:50 +0200 |
commit | ca45bda5bb9d7d3e82b4868b84c923493b61834d (patch) | |
tree | 4454b5b7de1f64915a6f55ef5a0b40e9b02eb030 /core/rootfs/rootfs-stage31/data/init | |
parent | [etherwake] add missing templates (diff) | |
download | mltk-23.tar.gz mltk-23.tar.xz mltk-23.zip |
[rootfs-stage31] Scan pci device tree recursivelyv23
Diffstat (limited to 'core/rootfs/rootfs-stage31/data/init')
-rwxr-xr-x | core/rootfs/rootfs-stage31/data/init | 9 |
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" |