Merge "Wrong arguments for die() call"

This commit is contained in:
Jenkins 2013-09-11 17:22:58 +00:00 committed by Gerrit Code Review
commit ac369d68d8

View File

@ -300,7 +300,7 @@ function extract_and_upload_k_and_r_from_image() {
out=$($BM_IMAGE_BUILD_DIR/bin/disk-image-get-kernel \ out=$($BM_IMAGE_BUILD_DIR/bin/disk-image-get-kernel \
-x -d $TOP_DIR/files -o bm-deploy -i $file) -x -d $TOP_DIR/files -o bm-deploy -i $file)
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
die "Failed to get kernel and ramdisk from $file" die $LINENO "Failed to get kernel and ramdisk from $file"
fi fi
XTRACE=$(set +o | grep xtrace) XTRACE=$(set +o | grep xtrace)
set +o xtrace set +o xtrace
@ -448,9 +448,9 @@ function add_baremetal_node() {
"$BM_FLAVOR_ROOT_DISK" \ "$BM_FLAVOR_ROOT_DISK" \
"$mac_1" \ "$mac_1" \
| grep ' id ' | get_field 2 ) | grep ' id ' | get_field 2 )
[ $? -eq 0 ] || [ "$id" ] || die "Error adding baremetal node" [ $? -eq 0 ] || [ "$id" ] || die $LINENO "Error adding baremetal node"
id2=$(nova baremetal-interface-add "$id" "$mac_2" ) id2=$(nova baremetal-interface-add "$id" "$mac_2" )
[ $? -eq 0 ] || [ "$id2" ] || die "Error adding interface to barmetal node $id" [ $? -eq 0 ] || [ "$id2" ] || die $LINENO "Error adding interface to barmetal node $id"
} }