Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 242376 - sys-fs/cryptsetup - dm-crypt post_mount executed even when mount point is not found
Summary: sys-fs/cryptsetup - dm-crypt post_mount executed even when mount point is not...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on: 273039
Blocks:
  Show dependency tree
 
Reported: 2008-10-16 18:42 UTC by Martin Kolleck
Modified: 2015-04-12 21:49 UTC (History)
0 users

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


Attachments
Patch against 1.0.5-r1, which is the current stable. (dm-crypt-start.sh.patch,377 bytes, patch)
2008-10-16 18:46 UTC, Martin Kolleck
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Kolleck 2008-10-16 18:42:07 UTC
/lib/rcscripts/addons/dm-crypt-start.sh contains a check whether the mount point for a target is found before post_mount is executed. The failure is noted, but post_mount is executed nonetheless.

This is in no way serious, but produces extra error messages when post_mount causes errors because of the missing mount point.

Suggested fix: return (or exit with appropriate eend?) after printing the message.

Reproducible: Always

Steps to Reproduce:
For me, running into this error was caused by mounting my dm-crypt partitions by label. In /etc/fstab, I have

LABEL=tmp  /tmp  ext2  defaults,noatime,errors=remount-ro  0 2

For some reason, /proc/mounts says that /dev/dm-2 is mounted on /tmp instead of /dev/mapper/tmp. I don't know why this happens, and putting /dev/mapper/tmp in /etc/fstab fixed my problem. These steps are unrelated to the bug itself, but this is how I found it.
Comment 1 Martin Kolleck 2008-10-16 18:46:13 UTC
Created attachment 168696 [details, diff]
Patch against 1.0.5-r1, which is the current stable.
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2008-10-17 21:15:28 UTC
/dev/dm-# should be a symlink to the actual /dev/mapper/NAME, so that shouldn't be an issue. Unless of course the script is not dereferencing symlinks properly.
Comment 3 Sven Wegener gentoo-dev 2009-04-15 23:32:51 UTC
I'm just thinking if someone might not want to mount the block device via fstab, but do some special custom mounting in post_mount.
Comment 4 SpanKY gentoo-dev 2015-04-12 21:49:58 UTC
should be all set now in the tree; thanks for the report!

Commit message: Delete old dm_crypt_execute_localmount hook as no one uses it anymore
http://sources.gentoo.org/sys-fs/cryptsetup/files/1.5.1-dmcrypt.rc?r1=1.6&r2=1.7