From 3e4b61d669a65bdc18117e4fa9522a0e2e17d9d7 Mon Sep 17 00:00:00 2001 From: zhangzujian Date: Fri, 28 Jun 2024 08:16:57 +0000 Subject: [PATCH] vpc-nat-gateway: print messgae to stderr Signed-off-by: zhangzujian --- dist/images/vpcnatgateway/lb-svc.sh | 2 +- dist/images/vpcnatgateway/nat-gateway.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/images/vpcnatgateway/lb-svc.sh b/dist/images/vpcnatgateway/lb-svc.sh index 87120f205a8..dc3abb37080 100644 --- a/dist/images/vpcnatgateway/lb-svc.sh +++ b/dist/images/vpcnatgateway/lb-svc.sh @@ -7,7 +7,7 @@ function exec_cmd() { $cmd ret=$? if [ $ret -ne 0 ]; then - echo "failed to exec \"$cmd\"" + >&2 echo "failed to exec command \"$cmd\"" exit $ret fi } diff --git a/dist/images/vpcnatgateway/nat-gateway.sh b/dist/images/vpcnatgateway/nat-gateway.sh index 59b8e053f0b..19ac4d83f55 100644 --- a/dist/images/vpcnatgateway/nat-gateway.sh +++ b/dist/images/vpcnatgateway/nat-gateway.sh @@ -5,7 +5,7 @@ function exec_cmd() { $cmd ret=$? if [ $ret -ne 0 ]; then - echo "failed to exec \"$cmd\"" + >&2 echo "failed to exec command \"$cmd\"" exit $ret fi } @@ -13,7 +13,7 @@ function exec_cmd() { function check_inited() { iptables-save -t nat | grep SNAT_FILTER | grep SHARED_SNAT if [ $? -ne 0 ]; then - echo "nat gateway not inited" + >&2 echo "nat gateway not initialized" exit 1 fi }