cryptroot-ask.sh: fix rd_LUKS_UUID handling
authorHarald Hoyer <harald@redhat.com>
Fri, 14 Aug 2009 14:11:35 +0000 (16:11 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 14 Aug 2009 14:21:03 +0000 (16:21 +0200)
modules.d/50plymouth/cryptroot-ask.sh
modules.d/90crypt/cryptroot-ask.sh

index 75c6550..9dbb44f 100755 (executable)
@@ -15,8 +15,9 @@ ask=1
 
 if [ -n "$LUKS" ]; then
     ask=0
+    luuid=${2##luks-}
     for luks in $LUKS; do
-       if [ "${2##$luks}" != "$2" ]; then
+       if [ "${luuid##$luks}" != "$2" ]; then
            ask=1
        fi
     done
index 5b5d895..9d23808 100755 (executable)
@@ -15,8 +15,9 @@ ask=1
 
 if [ -n "$LUKS" ]; then
     ask=0
+    luuid=${2##luks-}
     for luks in $LUKS; do
-       if [ "${2##$luks}" != "$2" ]; then
+       if [ "${luuid##$luks}" != "$2" ]; then
            ask=1
        fi
     done
@@ -33,4 +34,4 @@ fi
 # mark device as asked
 >> /tmp/cryptroot-asked-$2
 
-exit 0
\ No newline at end of file
+exit 0