From b595cc0fb5f0dafe3604f2d2d4915de1acd9c754 Mon Sep 17 00:00:00 2001 From: hlein Date: Mon, 6 Mar 2017 00:41:21 -0700 Subject: 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. --- include/tests_filesystems | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/tests_filesystems') diff --git a/include/tests_filesystems b/include/tests_filesystems index 731198e7..fa178a12 100644 --- a/include/tests_filesystems +++ b/include/tests_filesystems @@ -247,9 +247,9 @@ # Can be ^/dev/partition # Test for UUID usage (e.g. UUID=uuid --> /dev/disk/by-uuid/) - HAS_UUID=`echo ${I} | ${GREPBINARY} "^UUID="` + HAS_UUID=$(echo ${I} | ${GREPBINARY} "^UUID=") if [ ! -z "${HAS_UUID}" ]; then - UUID=`echo ${HAS_UUID} | ${AWKBINARY} -F= '{ print $2 }'` + UUID=$(echo ${HAS_UUID} | ${AWKBINARY} -F= '{ print $2 }') LogText "Result: Using ${UUID} as UUID" if [ ! -z "${BLKIDBINARY}" ]; then FIND2=$(${BLKIDBINARY} | ${AWKBINARY} '{ if ($2=="UUID=\"${UUID}\"") print $1 }' | ${SEDBINARY} 's/:$//') @@ -303,7 +303,7 @@ else Display --indent 2 --text "- Testing swap partitions" --result "CHECK NEEDED" --color YELLOW LogText "Result: possible incorrect mount options used for mounting swap partition (${FIND})" - #ReportWarning ${TEST_NO} "Possible incorrect mount options used for swap parition (${FIND})" + #ReportWarning ${TEST_NO} "Possible incorrect mount options used for swap partition (${FIND})" ReportSuggestion ${TEST_NO} "Check your /etc/fstab file for swap partition mount options" LogText "Notes: usually swap partition have 'sw' or 'swap' in the options field (4th)" fi @@ -429,7 +429,7 @@ FIND1="${ROOTDIR}dev/root" else # Only determine device if it is EXT2/3/4 - #FIND1=`mount | ${GREPBINARY} "on / " | ${AWKBINARY} '{ if ($5~/ext[2-4]/) { print $1 }}'` + #FIND1=$(mount | ${GREPBINARY} "on / " | ${AWKBINARY} '{ if ($5~/ext[2-4]/) { print $1 }}') FIND1=$(${MOUNTBINARY} -t ext2,ext3,ext4 | ${GREPBINARY} "on / " | ${AWKBINARY} '{ print $1 }') fi # Trying to determine default mount options from EXT2/EXT3/EXT4 file systems @@ -538,7 +538,7 @@ PARTIALLY_HARDENED=0 FULLY_HARDENED=1 for FLAG in ${EXPECTED_FLAGS}; do - FLAG_AVAILABLE=`echo ${FOUND_FLAGS} | ${GREPBINARY} ${FLAG}` + FLAG_AVAILABLE=$(echo ${FOUND_FLAGS} | ${GREPBINARY} ${FLAG}) if [ "${FLAG_AVAILABLE}" = "" ]; then LogText "Result: Could not find mount option ${FLAG} on file system ${FILESYSTEM}" FULLY_HARDENED=0 -- cgit v1.2.3