From 621f814e75a3dddf96bf711794753df3815d6015 Mon Sep 17 00:00:00 2001 From: Norbert Illes Date: Tue, 8 Mar 2016 13:28:51 +0100 Subject: [PATCH] NovaEvacuate: Remove bashism Commit 143864c694 introduced a bashism, this commit fixes it by using a pipe instead of a process substituion. As pipes can only carry standard output, we first redirect stderr to stdout, pipe it to grep, then redirect the filtered output to stderr again. Closes-Bug: #1555020 Change-Id: Ia0a5cc7130ae8029bb348c0f439f2c92f247d1e6 Signed-off-by: Norbert Illes --- ocf/NovaEvacuate | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ocf/NovaEvacuate b/ocf/NovaEvacuate index c073b48..328731a 100644 --- a/ocf/NovaEvacuate +++ b/ocf/NovaEvacuate @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # # NovaCompute agent manages compute daemons. @@ -256,7 +256,7 @@ evacuate_monitor() { handle_evacuations $( attrd_updater -n evacuate -A \ - 2> >(grep -v "attribute does not exist" 1>&2) | + 2>&1 | grep -v "attribute does not exist" | sed 's/ value=""/ value="no"/' | tr '="' ' ' | awk '{print $4" "$6}'