Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 947201 - sys-fs/cryptsetup Service does not wait on sources without "="
Summary: sys-fs/cryptsetup Service does not wait on sources without "="
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2024-12-30 07:24 UTC by Wade Cline
Modified: 2024-12-30 18:17 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fixes the service script to wait for source file existence (patch,1.02 KB, patch)
2024-12-30 08:10 UTC, Wade Cline
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wade Cline 2024-12-30 07:24:34 UTC
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 ]
Comment 1 Wade Cline 2024-12-30 08:10:33 UTC
Created attachment 915504 [details, diff]
Fixes the service script to wait for source file existence