summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorOndrej Kozina <okozina@redhat.com>2017-10-10 15:21:28 +0200
committerOndrej Kozina <okozina@redhat.com>2017-10-10 15:21:35 +0200
commit59145715f12c65bca68d28bd7e04e660752d6760 (patch)
tree397b5b149f80026b82f8e262a6d75a5ae8dac5f4 /scripts
parent27ef503b35daf63b5cf8c1af3b009abe61335759 (diff)
downloadlvm2-59145715f12c65bca68d28bd7e04e660752d6760.tar.gz
fsadm: minor fixes for crypt support
drop useless asterisk expansion enforce matching string prefix by adding ^
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/fsadm.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/fsadm.sh b/scripts/fsadm.sh
index da687fd99..a0a75b69b 100755
--- a/scripts/fsadm.sh
+++ b/scripts/fsadm.sh
@@ -548,9 +548,9 @@ detect_luks_device() {
return
fi
- _LUKS_UUID="CRYPT-LUKS$_LUKS_VERSION-${_LUKS_UUID//[UID:[:space:]-]/}-*"
+ _LUKS_UUID="CRYPT-LUKS$_LUKS_VERSION-${_LUKS_UUID//[UID:[:space:]-]/}-"
- CRYPT_NAME=$(dmsetup info -c --noheadings -S "UUID=~$_LUKS_UUID&&segments=1&&devnos_used='$MAJOR:$MINOR'" -o name)
+ CRYPT_NAME=$(dmsetup info -c --noheadings -S "UUID=~^$_LUKS_UUID&&segments=1&&devnos_used='$MAJOR:$MINOR'" -o name)
test -z "$CRYPT_NAME" || CRYPT_DATA_OFFSET=$(dmsetup table $CRYPT_NAME | cut -d ' ' -f 8)
}