diff options
Diffstat (limited to 'functest/opnfv_tests/openstack/cinder/write_data.sh')
-rw-r--r-- | functest/opnfv_tests/openstack/cinder/write_data.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/functest/opnfv_tests/openstack/cinder/write_data.sh b/functest/opnfv_tests/openstack/cinder/write_data.sh index 70f8275f1..16cea17bf 100644 --- a/functest/opnfv_tests/openstack/cinder/write_data.sh +++ b/functest/opnfv_tests/openstack/cinder/write_data.sh @@ -9,10 +9,11 @@ # http://www.apache.org/licenses/LICENSE-2.0 DEST=$(mktemp -d) -VOL_DEV_NAME="$(lsblk -l -o NAME | grep -o "vdc\|sdc\b")" - +VOL_DEV_NAME=${1:-vdb} echo "VOL_DEV_NAME: $VOL_DEV_NAME" +echo "$(lsblk -l -o NAME)" + if [ ! -z $VOL_DEV_NAME ]; then sudo /usr/sbin/mkfs.ext4 -F /dev/$VOL_DEV_NAME sudo mount /dev/$VOL_DEV_NAME $DEST @@ -25,3 +26,5 @@ else echo "Failed to write data!" exit 1 fi + +exit 0 |