From de87b5491a9cd6e1cc45c88f149ef6be1477139a Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 11 Feb 2019 12:27:34 -0600 Subject: [PATCH] divider length --- defaults.inc | 10 +++++++--- nodemgmt-scripts.sh | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/defaults.inc b/defaults.inc index b2686a24..fb2a1a9e 100755 --- a/defaults.inc +++ b/defaults.inc @@ -107,10 +107,14 @@ DISP_HEADER(){ } DIVIDER(){ - if [ -z ${2+x} ]; then clr='yellow' - else clr=$2 + if [ -z ${2+x} ]; then local clr='yellow' + else local clr=$2 fi - echo -e "${idsCL[${clr~}]}-----------------------------------------------------------------------${idsCL[Default]}" + if [ -z ${3+x} ]; then local length=70 + else local length=$3 + fi + local c=0; local dashes=''; until [ $c = ${length} ]; do local dashes="${dashes} "; local c=`expr $c + 1`; done + echo -e "${idsCL[${clr~}]}${dashes}${idsCL[Default]}" if [ "$1" = true ]; then echo "" fi diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 966ba179..c9b186d8 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -625,7 +625,7 @@ LISTCERTS(){ echo -e "${idsCL[Cyan]}${spc} ${idsCL[Cyan]}${SUBJECT_NAMES[3]}, ${SUBJECT_NAMES[4]}, ${SUBJECT_NAMES[5]}${idsCL[Default]}" fi - DIVIDER false lightGray + DIVIDER false darkGray done echo if [ -z $action ] || [ "${action}" = "gui" ]; then