diff options
author | hlein <hlein@korelogic.com> | 2017-03-06 10:41:21 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2017-03-06 10:41:21 +0300 |
commit | b595cc0fb5f0dafe3604f2d2d4915de1acd9c754 (patch) | |
tree | 285792c98f8d9d404d55a0d258c8e274868c74d7 /lynis | |
parent | b9ae378edb9ab109eeb25cc27599b76b2f6f6bfb (diff) |
Various cleanups (#363)
* Typo fix.
* Style change: always use $(), never ``.
The Lynis code already mostly used $(), but backticks were sprinkled
around. Converted all of them.
* Lots of minor spelling/typo fixes.
FWIW these were found with:
find . -type f -print0 | xargs -0 cat | aspell list | sort -u | egrep '^[a-z]+$' | less
And then reviewing the list to pick out things that looked like
misspelled words as opposed to variables, etc., and then manual
inspection of context to determine the intention.
Diffstat (limited to 'lynis')
-rwxr-xr-x | lynis | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -61,7 +61,7 @@ ################################################################################# # # Work directory - WORKDIR=`pwd` + WORKDIR=$(pwd) # Test from which directories we can use all functions and tests @@ -248,7 +248,7 @@ Make sure to execute ${PROGRAM_NAME} from untarred directory or check your insta ################################################################################# # # CV - Current Version - PROGRAM_AC=`echo ${PROGRAM_VERSION} | awk '{ print $1 }' | sed 's/[.]//g'` + PROGRAM_AC=$(echo ${PROGRAM_VERSION} | awk '{ print $1 }' | sed 's/[.]//g') PROGRAM_LV=0 # ################################################################################# @@ -299,7 +299,7 @@ ${NORMAL} ################################################################################# # # Decide where to write our PID file. For unprivileged users this will be in their home directory, or /tmp if their - # home directory isn't set. For root it will be /var/run, or the current workign directory if /var/run doesn't exist. + # home directory isn't set. For root it will be /var/run, or the current working directory if /var/run doesn't exist. MYHOMEDIR=$(echo ~ 2> /dev/null) if [ "${MYHOMEDIR}" = "" ]; then MYHOMEDIR="/tmp"; fi @@ -815,14 +815,14 @@ ${NORMAL} LogText "Found plugin file: ${PLUGIN_FILE}" # Double check if output is a valid file name if [ -f ${PLUGIN_FILE} ]; then - FIND2=`grep "^# PLUGIN_NAME=" ${PLUGIN_FILE} | awk -F= '{ print $2 }'` + FIND2=$(grep "^# PLUGIN_NAME=" ${PLUGIN_FILE} | awk -F= '{ print $2 }') if [ ! "${FIND2}" = "" -a ! "${FIND2}" = "[plugin_name]" ]; then if [ ${PLUGIN_PHASE} -eq 1 ]; then N_PLUGIN=$((${N_PLUGIN} + 1)); fi # Check if the plugin is enabled in any of the profiles PLUGIN_ENABLED_STATE=0 for PROFILE in ${PROFILES}; do LogText "Action: checking plugin status in profile: ${PROFILE}" - FIND3=`grep "^plugin=${FIND2}" ${PROFILE}` + FIND3=$(grep "^plugin=${FIND2}" ${PROFILE}) if [ ! "${FIND3}" = "" ]; then LogText "Result: plugin enabled in profile (${PROFILE})" PLUGIN_ENABLED_STATE=1 @@ -832,8 +832,8 @@ ${NORMAL} LogText "Result: plugin ${FIND2} is enabled" PLUGINFILE="${PLUGINDIR}/plugin_${FIND2}_phase${PLUGIN_PHASE}" if [ -f ${PLUGINFILE} ]; then - PLUGIN_VERSION=`grep "^# PLUGIN_VERSION=" ${PLUGIN_FILE} | awk -F= '{ print $2 }'` - PLUGIN_VERSION_NODOTS=`echo ${PLUGIN_VERSION} | sed 's/.//g'` + PLUGIN_VERSION=$(grep "^# PLUGIN_VERSION=" ${PLUGIN_FILE} | awk -F= '{ print $2 }') + PLUGIN_VERSION_NODOTS=$(echo ${PLUGIN_VERSION} | sed 's/.//g') if SafePerms ${PLUGINFILE}; then LogText "Including plugin file: ${PLUGINFILE} (version: ${PLUGIN_VERSION})" Report "plugin_enabled_phase${PLUGIN_PHASE}[]=${FIND2}|${PLUGIN_VERSION}|" |