1
0
Fork 0
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:
Diver 2017-02-02 20:14:16 +03:00
parent fe330bab03
commit f66edd28c4
2 changed files with 5 additions and 4 deletions

View file

@ -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

View file

@ -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