SVN: geninitrd/trunk/functions
wiget
wiget at pld-linux.org
Wed Feb 2 17:23:31 CET 2011
Author: wiget
Date: Wed Feb 2 17:23:30 2011
New Revision: 12101
Modified:
geninitrd/trunk/functions
Log:
Allow rootfs on crypted device
Modified: geninitrd/trunk/functions
==============================================================================
--- geninitrd/trunk/functions (original)
+++ geninitrd/trunk/functions Wed Feb 2 17:23:30 2011
@@ -64,15 +64,33 @@
esac
case $rootdev in
- /dev/dm-* | /dev/mapper/*)
+ /dev/dm-*)
local node
- node=$(dm_lvm2_name "$rootdev") || return 1
+ node=$(dm_longname "$rootdev") || return 1
if [ "$node" ]; then
rootdev="$node"
fi
;;
esac
+ case $rootdev in
+ /dev/mapper/*)
+ local dm_uuid=$(dmsetup info -c --noheadings $rootdev | awk -F: '{print $8}')
+ case $dm_uuid in
+ LVM-*)
+ local node
+ node=$(dm_lvm2_name "$rootdev") || return 1
+ if [ "$node" ]; then
+ rootdev="$node"
+ fi
+ return 0
+ ;;
+ CRYPT-*)
+ return 0
+ ;;
+ esac
+ esac
+
if [ "$rootFs" = "nfs" ]; then
rootdev="/dev/nfs"
return 0
More information about the pld-cvs-commit
mailing list