SVN: geninitrd/trunk/functions
glen
glen at pld-linux.org
Mon Apr 16 18:02:52 CEST 2012
Author: glen
Date: Mon Apr 16 18:02:52 2012
New Revision: 12548
Modified:
geninitrd/trunk/functions
Log:
workaround for subsystem being empty on lvm2 2.02.72 on 2.6.16 kernel
Modified: geninitrd/trunk/functions
==============================================================================
--- geninitrd/trunk/functions (original)
+++ geninitrd/trunk/functions Mon Apr 16 18:02:52 2012
@@ -157,8 +157,16 @@
# node can be /dev/dm-0, /dev/mapper/name
# @return subsystem name
dm_subsystem() {
- local node="$1"
- dmsetup info -c --noheadings -o subsystem $node
+ local node="$1" out
+ out=$(dmsetup info -c --noheadings -o subsystem $node)
+ if [ -n "$out" ]; then
+ echo "$out"
+ return
+ fi
+
+ # for very old kernels (2.6.16), subsystem is empty, assume LVM
+ # TODO: fix this if needed to have crypt as well
+ echo "LVM"
}
# resolve any dm node to it's full path in /dev/mapper
More information about the pld-cvs-commit
mailing list