|
|
@ -1,6 +1,15 @@ |
|
|
|
#!/bin/sh |
|
|
|
|
|
|
|
_storage=${1} |
|
|
|
_usage() { |
|
|
|
echo " |
|
|
|
Usage: $0 <storage> |
|
|
|
<storage> : should be a valid (active, supporting VM image) PVE storage |
|
|
|
" |
|
|
|
} |
|
|
|
|
|
|
|
[ -z "$1" ] && _usage && return |
|
|
|
|
|
|
|
_storage=$1 |
|
|
|
pvesm status --enabled --target localhost --content images |awk {'print $1'} |tail +2 |grep "$_storage" > /dev/null 2>&1 |
|
|
|
if [ "$?" -ne "0" ]; then |
|
|
|
echo "Storage $_storage does not seems to exists. Use 'pvesm status' to find a usable storage" |
|
|
|