Also verify that node is a SGE submit host
This commit is contained in:
parent
4b491ed2d4
commit
123f5afaa2
|
@ -70,11 +70,21 @@ debug_message() { # {{{
|
||||||
# }}}
|
# }}}
|
||||||
is_sge_host() { # {{{
|
is_sge_host() { # {{{
|
||||||
|
|
||||||
## Check if SGE commands (qhost) are available
|
## Check if SGE commands (qconf) are available
|
||||||
if [ "$(command -v qhost)" ]; then
|
if [ "$(command -v qconf)" ]; then
|
||||||
return_is_sge_host="0"
|
|
||||||
debug_message "is_sge_host − \
|
debug_message "is_sge_host − \
|
||||||
SGE seems present on this host."
|
SGE seems present on this host."
|
||||||
|
|
||||||
|
### And verify if the host is fully configured as a submit host
|
||||||
|
if qconf -ss | grep --word-regexp --quiet $(hostname -f); then
|
||||||
|
debug_message "is_sge_host − \
|
||||||
|
The host seems configured as a SGE submit host."
|
||||||
|
return_is_sge_host="0"
|
||||||
|
else
|
||||||
|
return_is_sge_host="1"
|
||||||
|
debug_message "is_sge_host − \
|
||||||
|
This host is not yet configured as a SGE submit host."
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
return_is_sge_host="1"
|
return_is_sge_host="1"
|
||||||
debug_message "is_sge_host − \
|
debug_message "is_sge_host − \
|
||||||
|
|
|
@ -93,11 +93,21 @@ define_vars() { # {{{
|
||||||
# }}}
|
# }}}
|
||||||
is_sge_host() { # {{{
|
is_sge_host() { # {{{
|
||||||
|
|
||||||
## Check if SGE commands (qhost) are available
|
## Check if SGE commands (qconf) are available
|
||||||
if [ "$(command -v qhost)" ]; then
|
if [ "$(command -v qconf)" ]; then
|
||||||
return_is_sge_host="0"
|
|
||||||
debug_message "is_sge_host − \
|
debug_message "is_sge_host − \
|
||||||
SGE seems present on this host."
|
SGE seems present on this host."
|
||||||
|
|
||||||
|
### And verify if the host is fully configured as a submit host
|
||||||
|
if qconf -ss | grep --word-regexp --quiet $(hostname -f); then
|
||||||
|
debug_message "is_sge_host − \
|
||||||
|
The host seems configured as a SGE submit host."
|
||||||
|
return_is_sge_host="0"
|
||||||
|
else
|
||||||
|
return_is_sge_host="1"
|
||||||
|
debug_message "is_sge_host − \
|
||||||
|
This host is not yet configured as a SGE submit host."
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
return_is_sge_host="1"
|
return_is_sge_host="1"
|
||||||
debug_message "is_sge_host − \
|
debug_message "is_sge_host − \
|
||||||
|
|
|
@ -75,11 +75,21 @@ debug_message() { # {{{
|
||||||
# }}}
|
# }}}
|
||||||
is_sge_host() { # {{{
|
is_sge_host() { # {{{
|
||||||
|
|
||||||
## Check if SGE commands (qhost) are available
|
## Check if SGE commands (qconf) are available
|
||||||
if [ "$(command -v qhost)" ]; then
|
if [ "$(command -v qconf)" ]; then
|
||||||
return_is_sge_host="0"
|
|
||||||
debug_message "is_sge_host − \
|
debug_message "is_sge_host − \
|
||||||
SGE seems present on this host."
|
SGE seems present on this host."
|
||||||
|
|
||||||
|
### And verify if the host is fully configured as a submit host
|
||||||
|
if qconf -ss | grep --word-regexp --quiet $(hostname -f); then
|
||||||
|
debug_message "is_sge_host − \
|
||||||
|
The host seems configured as a SGE submit host."
|
||||||
|
return_is_sge_host="0"
|
||||||
|
else
|
||||||
|
return_is_sge_host="1"
|
||||||
|
debug_message "is_sge_host − \
|
||||||
|
This host is not yet configured as a SGE submit host."
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
return_is_sge_host="1"
|
return_is_sge_host="1"
|
||||||
debug_message "is_sge_host − \
|
debug_message "is_sge_host − \
|
||||||
|
|
|
@ -149,11 +149,21 @@ ${sge_hostname} is not the current host."
|
||||||
# }}}
|
# }}}
|
||||||
is_sge_host() { # {{{
|
is_sge_host() { # {{{
|
||||||
|
|
||||||
## Check if SGE commands (qhost) are available
|
## Check if SGE commands (qconf) are available
|
||||||
if [ "$(command -v qhost)" ]; then
|
if [ "$(command -v qconf)" ]; then
|
||||||
return_is_sge_host="0"
|
|
||||||
debug_message "is_sge_host − \
|
debug_message "is_sge_host − \
|
||||||
SGE seems present on this host."
|
SGE seems present on this host."
|
||||||
|
|
||||||
|
### And verify if the host is fully configured as a submit host
|
||||||
|
if qconf -ss | grep --word-regexp --quiet $(hostname -f); then
|
||||||
|
debug_message "is_sge_host − \
|
||||||
|
The host seems configured as a SGE submit host."
|
||||||
|
return_is_sge_host="0"
|
||||||
|
else
|
||||||
|
return_is_sge_host="1"
|
||||||
|
debug_message "is_sge_host − \
|
||||||
|
This host is not yet configured as a SGE submit host."
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
return_is_sge_host="1"
|
return_is_sge_host="1"
|
||||||
debug_message "is_sge_host − \
|
debug_message "is_sge_host − \
|
||||||
|
|
Loading…
Reference in New Issue