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 _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit