Re: Error codes/return values of iscsiadm commands

2010-07-14 Thread Mike Christie
On 07/14/2010 05:30 AM, HIMANSHU wrote: How can we know error status of iscsiadm commands like discovery,login,logout. I think,all of them directly returns corresponding success/failure messages. so mostly I can just fire the commands without checking any error codes after it? If you run

Re: Error codes/return values of iscsiadm commands

2010-07-14 Thread Boaz Harrosh
On 07/14/2010 08:23 PM, Mike Christie wrote: On 07/14/2010 10:49 AM, Boaz Harrosh wrote: On 07/14/2010 05:52 PM, Mike Christie wrote: On 07/14/2010 05:30 AM, HIMANSHU wrote: How can we know error status of iscsiadm commands like discovery,login,logout. I think,all of them directly returns

Re: Error codes/return values of iscsiadm commands

2010-07-14 Thread Mike Christie
On 07/14/2010 12:56 PM, Boaz Harrosh wrote: On 07/14/2010 08:23 PM, Mike Christie wrote: On 07/14/2010 10:49 AM, Boaz Harrosh wrote: On 07/14/2010 05:52 PM, Mike Christie wrote: On 07/14/2010 05:30 AM, HIMANSHU wrote: How can we know error status of iscsiadm commands like

Re: Error codes/return values of iscsiadm commands

2010-07-14 Thread HIMANSHU
Thanks for replies. Yes,I generally do it using $? for other linux commands,but somehow not comfortable doing it here. iscsiadm -m ... sucess 2failure and if file is non-empty,print the contents accordingly is what I can think of. It might be very ugly way of doing it. On Jul 14, 2:20 pm, Mike