I think that the dmcrypt init script should support UUIDs as sources in /etc/conf.d/dmcrypt. I wrote a tiny patch for /etc/init.d/dmcrypt which adds this capability without modifying script's restrictions (not being bash specific, not using binaries in /usr), so one can use in /etc/conf.d/dmcrypt something like this: source=UUID="f47ac10b-58cc-4372-a567-0e02b2c3d479" It needs blkid, but this is part of sys-apps/util-linux which is already a dependency for cryptsetup and resides in /sbin Here it is: --- original/etc/init.d/dmcrypt 2012-06-07 04:53:26.090158313 +0300 +++ modified/etc/init.d/dmcrypt 2012-06-07 05:04:48.200632821 +0300 @@ -39,6 +39,9 @@ else return fi + if echo "${source}" | egrep -q "^UUID=" ; then + source="$(blkid -U $(echo "${source}" | cut -d "=" -f2))" + fi if [ -z "${source}" ] && [ ! -e "${source}" ] ; then ewarn "source \"${source}\" for ${target} missing, skipping..." return Reproducible: Always
InCVS for >=1.5.1