Author: glen
Date: Fri Feb 27 17:45:55 2009
New Revision: 10151

Modified:
   geninitrd/trunk/mod-luks.sh
Log:
- skip is_luks if USE_LUKS is disabled
- full path to cryptsetup

Modified: geninitrd/trunk/mod-luks.sh
==============================================================================
--- geninitrd/trunk/mod-luks.sh (original)
+++ geninitrd/trunk/mod-luks.sh Fri Feb 27 17:45:55 2009
@@ -20,6 +20,12 @@
 # @access      public
 is_luks() {
        local node="$1"
+
+       # luks not wanted
+       if is_no "$USE_LUKS"; then
+               return 1
+       fi
+
        if [ ! -e "$node" ]; then
                warn "is_luks(): node $node doesn't exist!"
                return 1
@@ -32,7 +38,7 @@
        fi
 
        dev=$(cryptsetup status $dm_name 2>/dev/null | awk '/device:/{print 
$2}')
-       cryptsetup isLuks $dev
+       /sbin/cryptsetup isLuks $dev
        rc=$?
 
        if [ $rc = 0 ]; then
@@ -51,7 +57,7 @@
        local dev
 
        local name=${devpath#/dev/mapper/}
-       LUKSDEV=$(cryptsetup status $name 2>/dev/null | awk '/device:/{print 
$2}')
+       LUKSDEV=$(/sbin/cryptsetup status $name 2>/dev/null | awk 
'/device:/{print $2}')
        if [ -z "$LUKSDEV" ]; then
                die "Lost cryptsetup device meanwhile?"
        fi
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to