summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorSimon Rettberg2024-01-29 15:24:58 +0100
committerSimon Rettberg2024-01-29 15:24:58 +0100
commitc1041b81dcdf521c60d4b58adfc03a1d4e72ac14 (patch)
tree9a12d40c06295399966c516833703be6d11ef9ee /core
parent[bwlp-stage4-tweaks] +x (diff)
downloadmltk-c1041b81dcdf521c60d4b58adfc03a1d4e72ac14.tar.gz
mltk-c1041b81dcdf521c60d4b58adfc03a1d4e72ac14.tar.xz
mltk-c1041b81dcdf521c60d4b58adfc03a1d4e72ac14.zip
[disk-partitions] Don't wait for udev if we scanned for HDDs in stage 3
Diffstat (limited to 'core')
-rwxr-xr-xcore/modules/disk-partitions/data/opt/openslx/scripts/systemd-setup_partitions13
1 files changed, 8 insertions, 5 deletions
diff --git a/core/modules/disk-partitions/data/opt/openslx/scripts/systemd-setup_partitions b/core/modules/disk-partitions/data/opt/openslx/scripts/systemd-setup_partitions
index c85f5079..26552b95 100755
--- a/core/modules/disk-partitions/data/opt/openslx/scripts/systemd-setup_partitions
+++ b/core/modules/disk-partitions/data/opt/openslx/scripts/systemd-setup_partitions
@@ -156,7 +156,7 @@ mount_temp_fallback () {
wait_for_udev () {
local upid ctr hdd
hdd=
- if [ "x$1" = "x--hdd" ]; then
+ if [ "$1" = "--hdd" ]; then
hdd=true
shift
fi
@@ -183,10 +183,13 @@ has_hdd () {
[ -n "$( ls -U -1 /dev/disk/by-path/ )" ]
}
-wait_for_udev 2
-
-if ! has_hdd; then
- wait_for_udev --hdd 4
+if ! [ -s "/run/openslx/dmsetup.state" ]; then
+ # If above file exists we should've waited for HDDs to appear in stage 3 already,
+ # so don't just wait for udev for two+ seconds for no reason.
+ wait_for_udev 2
+ if ! has_hdd; then
+ wait_for_udev --hdd 4
+ fi
fi
declare -A known=