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:
authorMichael Boelen <michael.boelen@cisofy.com>2016-07-05 13:16:49 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-07-05 13:16:49 +0300
commitfbd24b585adb8cc71243785e40fefafb38eaa14e (patch)
tree6eb1a39ad5c517e73815c6ab4ed490e552680002
parentb5b8861368cef8934fbe18c23f5918544e4f8be5 (diff)
Rename Maid to CleanUp
-rw-r--r--include/functions38
-rwxr-xr-xlynis2
2 files changed, 20 insertions, 20 deletions
diff --git a/include/functions b/include/functions
index abbd62af..8a8fe00d 100644
--- a/include/functions
+++ b/include/functions
@@ -28,9 +28,10 @@
# AddSystemGroup Adds a system to a group
# CheckFilePermissions Check file permissions
# CheckUpdates Determine if a new version of Lynis is available
-# CreateTempFile Create a temporary file
+# CleanUp Clean up files before closing program
# CountTests Count number of performed tests
# ContainsString Find the needle (string) in the haystack (another string)
+# CreateTempFile Create a temporary file
# Debug Display additional information on the screen (not suited for cronjob)
# DigitsOnly Return only the digits from a string
# DirectoryExists Check if a directory exists on the disk
@@ -43,12 +44,12 @@
# FileIsEmpty Check if a file is empty
# FileIsReadable Check if a file is readable or directory accessible
# GetHostID Retrieve an unique ID for this host
+# InsertSection Insert a section block
+# InsertPluginSection Insert a section block for plugins
# IsDebug Check if --debug is used
# IsDeveloperMode Check if --developer is used
# IsDeveloperVersion Check if program is a developer release
# IsRunning Check if a process is running
-# InsertSection Insert a section block
-# InsertPluginSection Insert a section block for plugins
# IsOwnedByRoot Determine if file or directory is owned by root
# IsVerbose Check if --verbose is used
# IsVirtualMachine Check if this system is a virtual machine
@@ -57,7 +58,6 @@
# IsWorldWritable Check if a file is world writable
# LogText Log text strings to logfile, prefixed with date/time
# LogTextBreak Insert a separator in log file
-# Maid
# ParseNginx Parse nginx configuration lines
# ParseTestValues Parse a set of values
# PortIsListening Check if machine is listening on specified protocol and port
@@ -227,6 +227,21 @@
################################################################################
+ # Name : CleanUp()
+ # Description : Cleanup service
+ # Returns : <nothing>
+ ################################################################################
+
+ CleanUp() {
+ echo ""; echo "Interrupt detected."
+ RemovePIDFile
+ RemoveTempFiles
+ Display --text "Cleaning up..." --result DONE --color GREEN
+ ExitFatal
+ }
+
+
+ ################################################################################
# Name : ContainsString()
# Description : Search a specific string (or regular expression) in another
# Returns : (0 - True, 1 - False)
@@ -1303,21 +1318,6 @@
################################################################################
- # Name : Maid()
- # Description : Cleanup service
- # Returns : <nothing>
- ################################################################################
-
- Maid() {
- echo ""; echo "Interrupt detected."
- RemovePIDFile
- RemoveTempFiles
- Display --text "Cleaning up..." --result DONE --color GREEN
- ExitFatal
- }
-
-
- ################################################################################
# Name : ParseTestValues()
# Description : Parse nginx configuration lines
# Inputs : service (e.g. ssh)
diff --git a/lynis b/lynis
index b1035b34..3dffa9d1 100755
--- a/lynis
+++ b/lynis
@@ -194,7 +194,7 @@ Make sure to execute ${PROGRAM_NAME} from untarred directory or check your insta
#
#################################################################################
#
- trap Maid INT
+ trap CleanUp INT
# Use safe umask for the files we create
umask 027