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:
-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