From 46faf66a251eb0a858237f32be3668f0227fe726 Mon Sep 17 00:00:00 2001 From: Peter Martini Date: Tue, 26 May 2015 22:26:47 -0400 Subject: [PATCH] Redirect error echoes to STDERR This is in a function whose output is consumed elsewhere, so echoing to STDOUT gets lost. Redirect to STDERR so it gets sent to the console. Change-Id: Iaab7eec097f7a3c3533afd20cc8da545bc4a425b --- .../files/create_vm_nodes-for-role.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/playbooks/roles/bifrost-create-vm-nodes/files/create_vm_nodes-for-role.sh b/playbooks/roles/bifrost-create-vm-nodes/files/create_vm_nodes-for-role.sh index 13dc0c90d..f7d69d9d2 100755 --- a/playbooks/roles/bifrost-create-vm-nodes/files/create_vm_nodes-for-role.sh +++ b/playbooks/roles/bifrost-create-vm-nodes/files/create_vm_nodes-for-role.sh @@ -70,7 +70,7 @@ function create_node { case $5 in i386) ARCH='i686' ;; amd64) ARCH='x86_64' ;; - *) echo "Unsupported arch $5!" ; exit 1 ;; + *) echo "Unsupported arch $5!" >&2; exit 1 ;; esac BRIDGE=$6 @@ -180,7 +180,7 @@ function create_node { virsh create /tmp/vm.xml 2>&1 >/dev/null if [ $? != 0 ] then - echo "failed to create VM $NAME" + echo "failed to create VM $NAME" >&2 rm -f /tmp/vm.xml exit 1 fi @@ -208,7 +208,7 @@ TEMPFILE=`mktemp` user=`whoami` if [ "$user" != "root" ] then - echo "Must be run as root. You are $user." + echo "Must be run as root. You are $user." >&2 exit 1 fi