diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2016-07-30 15:10:29 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2016-07-30 15:10:29 +0300 |
commit | c74c57242220daac0799717c556134d87cf6b5fb (patch) | |
tree | c41a5331275a320f500244b2fe33eb663a547e65 | |
parent | 220476d955fa08c5f9189d4c73d7a105ebdb970f (diff) |
[FILE-6332] Enable testing for UUID usage with blkid command
-rw-r--r-- | include/tests_filesystems | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/tests_filesystems b/include/tests_filesystems index 479a5d36..eecb621b 100644 --- a/include/tests_filesystems +++ b/include/tests_filesystems @@ -221,21 +221,21 @@ REAL="" UUID="" LogText "Swap partition found: ${I}" - # YYY Add a test if partition is not a normal partition (e.g. UUID=) + # TODO Add a test if partition is not a normal partition (e.g. UUID=) # Can be ^/dev/mapper/vg-name_lv-name # Can be ^/dev/partition - # Can be ^UUID=uuid --> /dev/disk/by-uuid/<uuid> + # Test for UUID usage (e.g. UUID=uuid --> /dev/disk/by-uuid/<uuid>) HAS_UUID=`echo ${I} | grep "^UUID="` if [ ! "${HAS_UUID}" = "" ]; then UUID=`echo ${HAS_UUID} | awk -F= '{ print $2 }'` LogText "Result: Using ${UUID} as UUID" - if [ ! "${BLKIDBINARYx}" = "" ]; then - FIND2=`${BLKIDBINARY} | awk '{ if ($2=="UUID=\"${UUID}\"") print $1 }' | sed 's/:$//'` + if [ ! "${BLKIDBINARY}" = "" ]; then + FIND2=$(${BLKIDBINARY} | awk '{ if ($2=="UUID=\"${UUID}\"") print $1 }' | sed 's/:$//') if [ ! "${FIND2}" = "" ]; then - REAL="${FIND2}" + REAL="${FIND2}" fi - else + else LogText "Result: blkid binary not found, trying by checking device listing" sFILE="" if [ -L /dev/disk/by-uuid/${UUID} ]; then @@ -245,7 +245,7 @@ REAL="${sFILE}" LogText "Result: disk is ${REAL}" fi - else + else LogText "Result: no symlink found to /dev/disk/by-uuid/${UUID}" fi fi |