init: Add optional sleep before creating device nodes

Some devices may need a bit of time to initialize their peripherals
(like the SD card on the Librem 5).
This commit is contained in:
Sebastian Krzyszkowiak 2021-01-24 06:21:44 +01:00
parent 921d72d282
commit 456757b85f
No known key found for this signature in database
GPG Key ID: E8F235CF3BDBC3FF

View File

@ -40,6 +40,11 @@ if [ -n "$LED" ]; then
echo $TRIGGER > /sys/class/leds/$LED/trigger
fi
if [ -n "$SLEEP" ]; then
echo "Waiting for hardware to initialize..."
sleep $SLEEP
fi
# Create device nodes
echo "Creating device nodes..."
mknod /dev/null c 1 3