On 07/14/2010 08:22 PM, HIMANSHU wrote:
Thanks for replies.
Yes,I generally do it using $? for other linux commands,but somehow
not comfortable doing it here.
iscsiadm -m ...>sucess 2>failure
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.
Yeah, I think some versions did not print out error codes correctly so
for the redhat/fc scripts we have this for some commands:
$exec -m node --logoutall=automatic 2>&1 > /dev/null | grep iscsiadm
# <sigh> iscsiadm does not always give a non 0 exit status in case of
# error so we grep for any messages to stderr and see those as
errors too
if [ ${PIPESTATUS[0]} -ne 0 -o ${PIPESTATUS[1]} -eq 0 ]; then
failure $"Stopping $prog"
echo
return 1
fi
--
You received this message because you are subscribed to the Google Groups
"open-iscsi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/open-iscsi?hl=en.