summaryrefslogtreecommitdiffstats
path: root/core/rootfs
diff options
context:
space:
mode:
authorSimon Rettberg2019-04-04 11:37:24 +0200
committerSimon Rettberg2019-04-04 11:37:24 +0200
commit524d8d4727501df9d3702d5e697180dc490fb244 (patch)
tree9eb4eec9a2fe0c65764a8be530560475d2e05d51 /core/rootfs
parent[hardware-stats] Fix smartctl part (diff)
downloadmltk-524d8d4727501df9d3702d5e697180dc490fb244.tar.gz
mltk-524d8d4727501df9d3702d5e697180dc490fb244.tar.xz
mltk-524d8d4727501df9d3702d5e697180dc490fb244.zip
[rootfs-stage32] Explicitly wait for a HDD when using --hdd
Before, we would exit the wait_for_hdd function if a) udevadm settle finishes, or additionally b) if --hdd was passed and something is in /dev/disk/by-path Now it's either condition a) if --hdd was not passed, or just condition b) if --hdd was passed, so in the latter case we'll keep waiting even if udevadm settle already finished.
Diffstat (limited to 'core/rootfs')
-rwxr-xr-xcore/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions b/core/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions
index 6a9ebfd4..2961b4f2 100755
--- a/core/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions
+++ b/core/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions
@@ -140,8 +140,9 @@ wait_for_udev () {
usleep 20000 # 20ms
udevadm settle &> /dev/null & # --timeout doesn't work reliably, sometimes the process just hangs
upid=$!
- while [ "$ctr" -gt 0 ] && [ -d "/proc/$upid" ]; do
+ while [ "$ctr" -gt 0 ]; do
[ -n "$hdd" ] && has_hdd && break
+ [ -z "$hdd" ] && ! [ -d "/proc/$upid" ] && break
usleep 100000 # 100ms
ctr=$(( ctr - 1 ))
done
@@ -157,7 +158,6 @@ has_hdd () {
wait_for_udev 2
if ! has_hdd; then
- sleep 1
wait_for_udev --hdd 4
fi