When using the 'dmcrypt' service in order to set-up 'cryptsetup' mappings, sources without a '=' in them are not waited on. This can result in the source not being found and the mapping not being properly set-up. For example: * Setting up dm-crypt mappings ... * source "/dev/disk/by-id/ata-ST380013AS_5MR23FA0-part2" for ata-ST380013AS_5MR23FA0-part2 missing, skipping... [ ok ] * Checking local filesystems ... /dev/disk/by-id/ata-ST380013AS_5MR23FA0-part1: clean, 11/2621440 files, 242382/10485504 blocks fsck.ext4: No such file or directory while trying to open /dev/mapper/ata-ST380013AS_5MR23FA0-part2 Possibly non-existent device? * Operational error [ !! ] The to-be-attached patch changes the service to wait the appropriate period for the existence of the specified source via bash's '-e' test, fixing the issue. For example: * Setting up dm-crypt mappings ... * waiting for source "/dev/disk/by-id/ata-ST380013AS_5MR23FA0-part2" for ata-ST380013AS_5MR23FA0-part2... * waiting for source "/dev/disk/by-id/ata-ST380013AS_5MR23FA0-part2" for ata-ST380013AS_5MR23FA0-part2... * ata-ST380013AS_5MR23FA0-part2 using: open /dev/disk/by-id/ata-ST380013AS_5MR23FA0-part2 ata-ST380013AS_5MR23FA0-part2 ... [ ok ] [ ok ] * Checking local filesystems ... /dev/sdb1: clean, 11/2621440 files, 242382/10485504 blocks /dev/mapper/ata-ST380013AS_5MR23FA0-part2: clean, 11/2260992 files, 219766/9041152 blocks [ ok ]
Created attachment 915504 [details, diff] Fixes the service script to wait for source file existence