Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2017-10-29 13:26:25 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2017-10-29 13:26:25 +0300
commite5c11991ef5e911ab8c015a73fa6cb8707c54eef (patch)
tree1aa9806d6628bf1ca00b81b67c88eb51cc917f97
parentebf16462a8b57dbf46e2a6ef7822fffcf77e351e (diff)
Code enhancements and textual change
-rw-r--r--include/functions8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/functions b/include/functions
index dd80140c..87382c58 100644
--- a/include/functions
+++ b/include/functions
@@ -511,7 +511,7 @@
shift
done
- if [ "${RESULT}" = "" ]; then
+ if [ -z "${RESULT}" ]; then
RESULTPART=""
else
if [ ${CRONJOB} -eq 0 ]; then
@@ -521,7 +521,7 @@
fi
fi
- if [ ! "${TEXT}" = "" ]; then
+ if [ ! -z "${TEXT}" ]; then
SHOW=0
if [ ${SHOW_WARNINGS_ONLY} -eq 1 ]; then
if [ "${RESULT}" = "WARNING" ]; then SHOW=1; fi
@@ -530,8 +530,8 @@
if [ ${SHOW} -eq 1 ]; then
# Display:
- # - counting with -m instead of -c, to support language locale
- # - wc needs LANG to deal with multi-bytes characters but LANG has been unset in include/consts...
+ # - for full shells, count with -m instead of -c, to support language locale (older busybox does not have -m)
+ # - wc needs LANG to deal with multi-bytes characters but LANG has been unset in include/consts
LINESIZE=$(export LC_ALL= ; export LANG="${DISPLAY_LANG}";echo "${TEXT}" | wc -m | tr -d ' ')
if [ ${SHOWDEBUG} -eq 1 ]; then DEBUGTEXT=" [${PURPLE}DEBUG${NORMAL}]"; else DEBUGTEXT=""; fi
if [ ${INDENT} -gt 0 ]; then SPACES=$((62 - INDENT - LINESIZE)); fi