mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-12 16:34:32 +02:00
Add IsDebug and IsVerbose functions
This commit is contained in:
parent
d54f3ae307
commit
64561d4b07
@ -43,9 +43,11 @@
|
|||||||
# FileIsEmpty Check if a file is empty
|
# FileIsEmpty Check if a file is empty
|
||||||
# FileIsReadable Check if a file is readable or directory accessible
|
# FileIsReadable Check if a file is readable or directory accessible
|
||||||
# GetHostID Retrieve an unique ID for this host
|
# GetHostID Retrieve an unique ID for this host
|
||||||
|
# IsDebug Check if --debug is used
|
||||||
# IsRunning Check if a process is running
|
# IsRunning Check if a process is running
|
||||||
# InsertSection Insert a section block
|
# InsertSection Insert a section block
|
||||||
# InsertPluginSection Insert a section block for plugins
|
# InsertPluginSection Insert a section block for plugins
|
||||||
|
# IsVerbose Check if --verbose is used
|
||||||
# IsVirtualMachine Check if this system is a virtual machine
|
# IsVirtualMachine Check if this system is a virtual machine
|
||||||
# IsWorldExecutable Check if a file is world executable
|
# IsWorldExecutable Check if a file is world executable
|
||||||
# IsWorldReadable Check if a file is world readable
|
# IsWorldReadable Check if a file is world readable
|
||||||
@ -879,6 +881,18 @@
|
|||||||
LogText "Action: Performing plugin tests"
|
LogText "Action: Performing plugin tests"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Name : IsDebug
|
||||||
|
# Description : Check if --debug option is used to show more details
|
||||||
|
# Returns : 0 (true) or 1 (false)
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
IsDebug() {
|
||||||
|
if [ ${DEBUG} -eq 1 ]; then return 0; else return 1; fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Name : IsRunning()
|
# Name : IsRunning()
|
||||||
# Description : Check if a process is running
|
# Description : Check if a process is running
|
||||||
@ -902,6 +916,18 @@
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Name : IsVerbose
|
||||||
|
# Description : Check if --verbose option is used to show more details on screen
|
||||||
|
# Returns : 0 (true) or 1 (false)
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
IsVerbose() {
|
||||||
|
if [ ${VERBOSE} -eq 1 ]; then return 0; else return 1; fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Name : IsVirtualMachine()
|
# Name : IsVirtualMachine()
|
||||||
# Description : Check if a specific item exists in the report
|
# Description : Check if a specific item exists in the report
|
||||||
|
Loading…
x
Reference in New Issue
Block a user