This is because the return code of 'service iptables status' is 3.
# service iptables status
iptables: Firewall is not running.
# echo $?
3
iptables: Firewall is not running.
# echo $?
3
Thanks
Best Regards
----------------------------------------------------------------------
Wang Xiaopeng (็ๆๆ)
IBM China System Technology Laboratory
Tel: 86-10-82453455
Email: [email protected]
Address: 28,ZhongGuanCun Software Park,No.8 Dong Bei Wang West Road, Haidian District Beijing P.R.China 100193
----- Original message -----
From: David D Johnson <[email protected]>
To: xCAT Users Mailing list <[email protected]>
Cc:
Subject: Re: [xcat-user] psh *** ssh exited with error code 3
Date: Fri, Mar 18, 2016 9:57 AM
I canโt get rid of the quote level, but here is a workaround:
> psh cn1 'service snmpd status || true'
> On Mar 17, 2016, at 7:56 PM, Stanislav Sergienko <[email protected]> wrote:
>
> Hello,
>
> Every time I run the service status command and the service is not running I get ssh exited with error code 3.
>
> Example:
>
> # psh cn1 "service iptables status"
> cn1: iptables: Firewall is not running.
> cn1: *** ssh exited with error code 3.
>
> # psh cn1 'service snmpd status'
> cn1: snmpd is stopped
> cn1: *** ssh exited with error code 3.
>
> But if I run the same command against the service that is running I do not see this message.
>
> Example:
>
> # psh cn1 service ntpd status
> cn1: ntpd (pid 6114) is running...
>
> So how do I get rid of these messages?
>
> Thank you.
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140_______________________________________________
> xCAT-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/xcat-user
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
xCAT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xcat-user
------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________ xCAT-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/xcat-user
