Merge "Redirect error echoes to STDERR"

This commit is contained in:
Jenkins 2015-05-29 05:56:41 +00:00 committed by Gerrit Code Review
commit 3e3920d030

View File

@ -70,7 +70,7 @@ function create_node {
case $5 in case $5 in
i386) ARCH='i686' ;; i386) ARCH='i686' ;;
amd64) ARCH='x86_64' ;; amd64) ARCH='x86_64' ;;
*) echo "Unsupported arch $5!" ; exit 1 ;; *) echo "Unsupported arch $5!" >&2; exit 1 ;;
esac esac
BRIDGE=$6 BRIDGE=$6
@ -180,7 +180,7 @@ function create_node {
virsh create /tmp/vm.xml 2>&1 >/dev/null virsh create /tmp/vm.xml 2>&1 >/dev/null
if [ $? != 0 ] if [ $? != 0 ]
then then
echo "failed to create VM $NAME" echo "failed to create VM $NAME" >&2
rm -f /tmp/vm.xml rm -f /tmp/vm.xml
exit 1 exit 1
fi fi
@ -208,7 +208,7 @@ TEMPFILE=`mktemp`
user=`whoami` user=`whoami`
if [ "$user" != "root" ] if [ "$user" != "root" ]
then then
echo "Must be run as root. You are $user." echo "Must be run as root. You are $user." >&2
exit 1 exit 1
fi fi