From f306fb0dfbf1077f31c207fb04146189350b2496 Mon Sep 17 00:00:00 2001 From: Sandino Araico Sanchez Date: Fri, 23 Dec 2016 00:16:34 -0600 Subject: [PATCH] Use variables for colored error --- scripts/test-variables | 1 + scripts/wrapper-badblocks | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/test-variables b/scripts/test-variables index ebfb57c..7eaa8e2 100755 --- a/scripts/test-variables +++ b/scripts/test-variables @@ -10,6 +10,7 @@ OFF=$'\e[0;0m' RES_OK=${GRN}OK${OFF} RES_FAIL=${RED}FAIL${OFF} +RES_ERROR=${RED}ERR${OFF} RES_ULT=${BLD}RESULT${OFF} #RES_FAIL_BLINK="${RED_BLINK}FAIL${OFF}" RES_FAIL_BIG="${RED_BOLD}######## FAIL ########${OFF}" diff --git a/scripts/wrapper-badblocks b/scripts/wrapper-badblocks index 8afeb32..3de99ea 100755 --- a/scripts/wrapper-badblocks +++ b/scripts/wrapper-badblocks @@ -74,7 +74,7 @@ else done smartctl -A -f brief /dev/$DISK \ | parse-smart-attr \ - | sed 's/ERROR/${RED}ERROR${OFF}/g' \ + | sed 's/ERROR/$RES_ERROR/g' \ > $OUTPUT_DIR/disk/$SERIAL.smart.error fi fi