diff options
Diffstat (limited to 'deploy/adapters/ansible/roles/storage/files/losetup.sh')
-rwxr-xr-x | deploy/adapters/ansible/roles/storage/files/losetup.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/storage/files/losetup.sh b/deploy/adapters/ansible/roles/storage/files/losetup.sh new file mode 100755 index 00000000..3e95069f --- /dev/null +++ b/deploy/adapters/ansible/roles/storage/files/losetup.sh @@ -0,0 +1,7 @@ +loop_dev=`losetup -a |grep "/var/storage.img"|awk -F':' '{print $1}'` +if [ -z $loop_dev ]; then + losetup -f --show /var/storage.img +else + echo $loop_dev +fi + |