Exit when found the new OSD ID
This commit is contained in:
parent
4d1a881339
commit
d6aff5233d
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Vars {{{
|
||||
debug="0"
|
||||
debug="1"
|
||||
|
||||
## Colors {{{
|
||||
c_redb='\033[1;31m'
|
||||
|
@ -44,9 +44,12 @@ while [ "${osd_id}" -lt "${osd_id_end}" ]; do
|
|||
if check_osd "${osd_id}"
|
||||
then
|
||||
get_osd_host "${osd_id}"
|
||||
[ "${debug}" -eq "0" ] && printf "${c_magentab}%-6b${c_reset}\n" "DEBUG : OSD ${osd_id} exists on ${c_redb}${osd_id_host}."
|
||||
[ "${debug}" -eq "0" ] && printf "${c_magentab}%-6b${c_reset}\n" "DEBUG : OSD ${osd_id} exists on ${c_redb}${osd_id_host}${c_reset}."
|
||||
else
|
||||
[ "${debug}" -eq "0" ] && printf "${c_magentab}%-6b${c_reset}\n" "DEBUG : ! OSD ${osd_id} does exists !"
|
||||
printf '%b\n' "The next OSD ID should be ${c_redb}${osd_id}${c_reset}. If you plan to use var :"
|
||||
printf '%b\n' "osd_id=\"${osd_id}\""
|
||||
exit 0
|
||||
fi
|
||||
|
||||
[ "${debug}" -eq "0" ] && printf "${c_magentab}%-6b${c_reset}\n" "-----------------------------------------------"
|
||||
|
|
Loading…
Reference in New Issue