Skip to content

Commit ca771eb

Browse files
committed
dracut/autoinstaller: Fix device race conditions
1 parent 1c2b263 commit ca771eb

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

dracut/autoinstaller/install.sh

+11-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ VAI_welcome() {
2121
printf "=============================================================\n"
2222
}
2323

24+
VAI_udev_settle() {
25+
/usr/bin/udevd --daemon
26+
/usr/bin/udevadm trigger --action=add --type=subsystems
27+
/usr/bin/udevadm trigger --action=add --type=devices
28+
/usr/bin/udevadm settle
29+
}
30+
2431
VAI_get_address() {
2532
mkdir -p /var/lib/dhclient
2633

@@ -236,10 +243,13 @@ VAI_configure_autoinstall() {
236243

237244
VAI_main() {
238245
CURRENT_STEP=0
239-
STEP_COUNT=16
246+
STEP_COUNT=17
240247

241248
VAI_welcome
242249

250+
VAI_print_step "Wait on hardware"
251+
VAI_udev_settle
252+
243253
VAI_print_step "Bring up the network"
244254
VAI_get_address
245255

dracut/autoinstaller/module-setup.sh

+1
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@ install() {
4040
inst /etc/ssl/certs.pem
4141

4242
inst_hook pre-mount 01 "$moddir/install.sh"
43+
inst_hook cmdline 99 "$moddir/parse-vai-root.sh"
4344
inst "$moddir/autoinstall.cfg" /etc/autoinstall.default
4445
}
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
if [ "${root}" = "vai" ] ; then
3+
rootok=1
4+
fi

0 commit comments

Comments
 (0)