crypt/parse-crypt.sh: hide encrypted devices from systemd timeout warnings.
PATCH v2 4/4 crypt/parse-crypt.sh: hide encrypted devices from systemd timeout warnings.
When systemd's crypttab generator parsed crypttab, it tells systemd about several devices which may not appear until later in the boot sequence, and which are not needed while dract is running.
This can particularly happen when an md array is encrypted, and the array is newly degraded so that it doesn't appear until dracut runs mdraid_start.sh.
This can result in systemd printing warning messages which are inappropriate.
So tell systemd that the timeout for each of these is zero.
This is involves splitting some functionality out of wait_for_dev()
That function does two things:
- creates 'finished' hooks so that dracut will wait for the device, and
- sets the systemd timeout for the device to zero, so systemd doesn't wait.
We only want the second of these for most encrypted devices. So split that out into a new function set_systemd_timeout_for_dev(), and call it from parse-crypt.sh
--
This version fixes the missing redirect from /etc/crypttab NeilBrown
modules.d/90crypt/parse-crypt.sh +4 -0
@@ -14,6 +14,10 @@ else LUKS=$(getargs rd.luks.uuid -d rd_LUKS_UUID) tout=$(getarg rd.luks.key.tout) + while read _mapper _dev _rest ; do + set_systemd_timeout_for_dev $_dev + done < /etc/crypttab + if [ -n "$LUKS" ]; then for luksid in $LUKS; do
modules.d/99base/dracut-lib.sh +34 -19
71 lines not on this page · raw message