Skip to content

Commit c40f053

Browse files
author
kishan
committed
bug 6425: run ssh in quiet mode to avoid warning
status 6425: resolved fixed
1 parent 3a0f30a commit c40f053

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎scripts/network/domr/networkUsage.sh‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ cert="/root/.ssh/id_rsa.cloud"
2222

2323
create_usage_rules () {
2424
local dRIp=$1
25-
ssh -p 3922 -o StrictHostKeyChecking=no -i $cert root@$dRIp "\
25+
ssh -q -p 3922 -o StrictHostKeyChecking=no -i $cert root@$dRIp "\
2626
iptables -N NETWORK_STATS > /dev/null;
2727
iptables -I FORWARD -j NETWORK_STATS > /dev/null;
2828
iptables -I INPUT -j NETWORK_STATS > /dev/null;
@@ -32,33 +32,33 @@ create_usage_rules () {
3232
iptables -A NETWORK_STATS -o eth2 ! -i eth0 -p tcp > /dev/null;
3333
iptables -A NETWORK_STATS -i eth2 ! -o eth0 -p tcp > /dev/null;
3434
"
35-
return 1
35+
return $?
3636
}
3737

3838
add_public_interface () {
3939
local dRIp=$1
4040
local pubIf=$2
41-
ssh -p 3922 -o StrictHostKeyChecking=no -i $cert root@$dRIp "\
41+
ssh -q -p 3922 -o StrictHostKeyChecking=no -i $cert root@$dRIp "\
4242
iptables -A NETWORK_STATS -i eth0 -o $pubIf > /dev/null;
4343
iptables -A NETWORK_STATS -i $pubIf -o eth0 > /dev/null;
4444
iptables -A NETWORK_STATS -o $pubIf ! -i eth0 -p tcp > /dev/null;
4545
iptables -A NETWORK_STATS -i $pubIf ! -o eth0 -p tcp > /dev/null;
4646
"
47-
return 1
47+
return $?
4848
}
4949

5050
delete_public_interface () {
5151
local dRIp=$1
5252
local pubIf=$2
53-
ssh -p 3922 -o StrictHostKeyChecking=no -i $cert root@$dRIp "\
53+
ssh -q -p 3922 -o StrictHostKeyChecking=no -i $cert root@$dRIp "\
5454
echo $pubIf >> /root/removedVifs;
5555
"
56-
return 1
56+
return $?
5757
}
5858

5959
get_usage () {
6060
local dRIp=$1
61-
ssh -p 3922 -o StrictHostKeyChecking=no -i $cert root@$dRIp "\
61+
ssh -q -p 3922 -o StrictHostKeyChecking=no -i $cert root@$dRIp "\
6262
iptables -L NETWORK_STATS -n -v -x | awk '\$1 ~ /^[0-9]+\$/ { printf \"%s:\", \$2}';
6363
/root/clearUsageRules.sh > /dev/null;
6464
"
@@ -71,7 +71,7 @@ get_usage () {
7171

7272
reset_usage () {
7373
local dRIp=$1
74-
ssh -p 3922 -o StrictHostKeyChecking=no -i $cert root@$dRIp "\
74+
ssh -q -p 3922 -o StrictHostKeyChecking=no -i $cert root@$dRIp "\
7575
iptables -Z NETWORK_STATS > /dev/null;
7676
"
7777
if [ $? -gt 0 -a $? -ne 2 ]

0 commit comments

Comments
 (0)