From 13ba95bb99d887337cfbffd3f9c34b3c1c3379ec Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 4 Oct 2022 10:39:02 -0400 Subject: [PATCH] Give up on waiting for disks Some profiles may have all disk support suppressed through blacklist until %pre comes along to fix it. This avoids /dev/disk ever existing. Wait up until 10 seconds before giving up. This gives disk subsystem a fair chance to speed up and avoid a wait, with a fallback worst case of 10 seconds --- .../usr/lib/dracut/hooks/pre-trigger/01-confluent.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/confluent_osdeploy/el8/initramfs/usr/lib/dracut/hooks/pre-trigger/01-confluent.sh b/confluent_osdeploy/el8/initramfs/usr/lib/dracut/hooks/pre-trigger/01-confluent.sh index 5e84bd3e..95b74586 100644 --- a/confluent_osdeploy/el8/initramfs/usr/lib/dracut/hooks/pre-trigger/01-confluent.sh +++ b/confluent_osdeploy/el8/initramfs/usr/lib/dracut/hooks/pre-trigger/01-confluent.sh @@ -38,8 +38,10 @@ umask 0077 mkdir -p /etc/confluent echo -n > /etc/confluent/confluent.info umask $oum -while [ ! -e /dev/disk ]; do +TRIES=5 +while [ ! -e /dev/disk ] && [ $TRIES -gt 0 ]; do sleep 2 + TRIES=$((TRIES - 1)) done if [ -e /dev/disk/by-label/CNFLNT_IDNT ]; then tmnt=/tmp/idntmnt