formatting

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
Thomas Sjögren 2018-05-10 15:41:27 +02:00
parent 6c0dce7b19
commit 11230d052e
2 changed files with 70 additions and 68 deletions

View file

@ -15,9 +15,13 @@ version='1.3.4'
. ./output_lib.sh . ./output_lib.sh
# Setup the paths # Setup the paths
this_path=$(abspath "$0") ## Path of this file including filenamel this_path=$(abspath "$0") ## Path of this file including filename
myname=$(basename "${this_path}") ## file name of this script. myname=$(basename "${this_path}") ## file name of this script.
readonly version
readonly this_path
readonly myname
export PATH=/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin/ export PATH=/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin/
# Check for required program(s) # Check for required program(s)
@ -112,15 +116,14 @@ main () {
running_containers=1 running_containers=1
fi fi
for test in tests/*.sh for test in tests/*.sh; do
do
. ./"$test" . ./"$test"
done done
if [ -z "$check" ] && [ ! "$checkexclude" ]; then if [ -z "$check" ] && [ ! "$checkexclude" ]; then
cis cis
elif [ -z "$check" ] && [ "$checkexclude" ]; then elif [ -z "$check" ] && [ "$checkexclude" ]; then
checkexcluded="$(echo $checkexclude | sed 's/,/|/g')" checkexcluded="$(echo "$checkexclude" | sed 's/,/|/g')"
for c in $(grep 'check_[0-9]_' functions_lib.sh | grep -vE "$checkexcluded"); do for c in $(grep 'check_[0-9]_' functions_lib.sh | grep -vE "$checkexcluded"); do
"$c" "$c"
done done

View file

@ -32,8 +32,7 @@ do_version_check() {
get_command_line_args() { get_command_line_args() {
PROC="$1" PROC="$1"
for PID in $(pgrep -f -n "$PROC") for PID in $(pgrep -f -n "$PROC"); do
do
tr "\0" " " < /proc/"$PID"/cmdline tr "\0" " " < /proc/"$PID"/cmdline
done done
} }