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
path: root/lynis
diff options
context:
space:
mode:
authormboelen <michael@cisofy.com>2016-04-25 11:18:09 +0300
committermboelen <michael@cisofy.com>2016-04-25 11:18:09 +0300
commiteae8ef99a46da9b9fdfed3b23d6f82a283178e27 (patch)
tree1b551a95d9d9c03a348d1e437bf0e27067198dc0 /lynis
parenta3075d2e8fb00c205ad7a11e0d7005f973683b2d (diff)
Exit with exit code 0 by default, unless error-on-warnings is being used
Diffstat (limited to 'lynis')
-rwxr-xr-xlynis7
1 files changed, 6 insertions, 1 deletions
diff --git a/lynis b/lynis
index 06afea7e..b607f932 100755
--- a/lynis
+++ b/lynis
@@ -986,7 +986,12 @@ ${NORMAL}
# Clean exit (Delete PID file)
if [ ${TOTAL_WARNINGS} -gt 0 ]; then
- ExitCustom 78
+ # Use exit code 78 if we found any warnings (and enabled)
+ if [ ${ERROR_ON_WARNINGS} -eq 1 ]; then
+ ExitCustom 78
+ else
+ ExitClean
+ fi
else
ExitClean
fi