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