mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
Changed '-eq' to '=' in 'ssh_check_cmd'
This commit is contained in:
parent
fe330bab03
commit
f66edd28c4
2 changed files with 5 additions and 4 deletions
|
@ -167,7 +167,7 @@ fi
|
|||
|
||||
# Prints "10" on stdout if found Primary Online control station. "11" - for Secondary Online control station.
|
||||
ssh_check_cmd() {
|
||||
ssh -q "$username@$1" '/nasmcd/sbin/getreason | grep -w "slot_$(/nasmcd/sbin/t2slot)" | cut -d- -f1'
|
||||
ssh -q "$username@$1" "/nasmcd/sbin/getreason | grep -w \"slot_\$(/nasmcd/sbin/t2slot)\" | cut -d- -f1 | awk '{print \$1}' "
|
||||
}
|
||||
|
||||
|
||||
|
@ -184,7 +184,7 @@ check_conf_and_set_vars () {
|
|||
fi
|
||||
#Choosing Cotrol Station. Code have to be "10"
|
||||
for CS in $cs_addr; do
|
||||
if [[ "10" -eq "$(ssh_check_cmd $CS)" ]]; then
|
||||
if [[ "10" = "$(ssh_check_cmd $CS)" ]]; then
|
||||
PRIMARY_CS=$CS
|
||||
SSH="ssh -q $username@$PRIMARY_CS "
|
||||
break
|
||||
|
|
|
@ -145,7 +145,8 @@ nas_servers=${nas_servers:="server_2 server_3"}
|
|||
|
||||
# Prints "10" on stdout if found Primary Online control station. "11" - for Secondary Online control station.
|
||||
ssh_check_cmd() {
|
||||
ssh -q "$username@$1" '/nasmcd/sbin/getreason | grep -w "slot_$(/nasmcd/sbin/t2slot)" | cut -d- -f1'
|
||||
ssh -q "$username@$1" "/nasmcd/sbin/getreason | grep -w \"slot_\$(/nasmcd/sbin/t2slot)\" | cut -d- -f1 | awk '{print \$1}' "
|
||||
|
||||
}
|
||||
|
||||
check_conf () {
|
||||
|
@ -161,7 +162,7 @@ check_conf () {
|
|||
|
||||
#Choosing Cotrol Station. Code have to be "10"
|
||||
for CS in $cs_addr; do
|
||||
if [[ "10" -eq "$(ssh_check_cmd $CS)" ]]; then
|
||||
if [[ "10" = "$(ssh_check_cmd $CS)" ]]; then
|
||||
PRIMARY_CS=$CS
|
||||
break
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue