mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-26 23:34:25 +02:00
Allow repository update to be disabled
This commit is contained in:
parent
8392587e60
commit
e176011912
@ -51,6 +51,9 @@ pause-between-tests=0
|
|||||||
# Enable quick mode (no waiting for keypresses, same as --quick option)
|
# Enable quick mode (no waiting for keypresses, same as --quick option)
|
||||||
quick=no
|
quick=no
|
||||||
|
|
||||||
|
# Refresh software repositories to help detecting vulnerable packages
|
||||||
|
refresh-repositories=yes
|
||||||
|
|
||||||
# Show inline tips about the tool
|
# Show inline tips about the tool
|
||||||
show-tool-tips=yes
|
show-tool-tips=yes
|
||||||
|
|
||||||
|
@ -165,6 +165,7 @@ unset LANG
|
|||||||
PROFILEVALUE=""
|
PROFILEVALUE=""
|
||||||
PSBINARY="ps"
|
PSBINARY="ps"
|
||||||
REDIS_RUNNING=0
|
REDIS_RUNNING=0
|
||||||
|
REFRESH_REPOSITORIES=1
|
||||||
REMOTE_LOGGING_ENABLED=0
|
REMOTE_LOGGING_ENABLED=0
|
||||||
RESOLV_DOMAINNAME=""
|
RESOLV_DOMAINNAME=""
|
||||||
RKHUNTERBINARY=""
|
RKHUNTERBINARY=""
|
||||||
|
@ -207,6 +207,15 @@
|
|||||||
AddSetting "quick" "${SETTING_QUICK_MODE}" "Quick mode (non-interactive)"
|
AddSetting "quick" "${SETTING_QUICK_MODE}" "Quick mode (non-interactive)"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
# Refresh software repositories
|
||||||
|
refresh-repositories)
|
||||||
|
SETTING_REFRESH_REPOSITORIES=1 # default is yes
|
||||||
|
FIND=$(echo "${VALUE}" | egrep "^(0|false|no)$") && REFRESH_REPOSITORIES=0
|
||||||
|
if [ ! -z "${FIND}" ]; then SETTING_REFRESH_REPOSITORIES=0; fi
|
||||||
|
Debug "Refreshing repositories set to ${SETTING_REFRESH_REPOSITORIES}"
|
||||||
|
AddSetting "refresh-repositories" "${SETTING_REFRESH_REPOSITORIES}" "Refresh repositories (for vulnerable package detection)"
|
||||||
|
;;
|
||||||
|
|
||||||
# Inline tips about tool (default enabled)
|
# Inline tips about tool (default enabled)
|
||||||
show_tool_tips | show-tool-tips)
|
show_tool_tips | show-tool-tips)
|
||||||
SETTING_SHOW_TOOL_TIPS=1 # default is yes
|
SETTING_SHOW_TOOL_TIPS=1 # default is yes
|
||||||
|
@ -989,9 +989,13 @@
|
|||||||
# Multiple ways to do this. Some require extra packages to be installed,
|
# Multiple ways to do this. Some require extra packages to be installed,
|
||||||
# others require potential firewall ports to be open, outbound. This is the
|
# others require potential firewall ports to be open, outbound. This is the
|
||||||
# "most friendly" way.
|
# "most friendly" way.
|
||||||
|
if [ ${REFRESH_REPOSITORIES} -eq 1 ]; then
|
||||||
LogText "Action: updating portage with emerge-webrsync"
|
LogText "Action: updating portage with emerge-webrsync"
|
||||||
/usr/bin/emerge-webrsync --quiet 2> /dev/null
|
/usr/bin/emerge-webrsync --quiet 2> /dev/null
|
||||||
LogText "Result: emerge-webrsync finished"
|
LogText "Result: emerge-webrsync finished"
|
||||||
|
else
|
||||||
|
LogText "Result: using a possibly outdated repository, as updating is disabled"
|
||||||
|
fi
|
||||||
LogText "Test: checking if /usr/bin/glsa-check exists"
|
LogText "Test: checking if /usr/bin/glsa-check exists"
|
||||||
if [ -x /usr/bin/glsa-check ]; then
|
if [ -x /usr/bin/glsa-check ]; then
|
||||||
PACKAGE_AUDIT_TOOL_FOUND=1
|
PACKAGE_AUDIT_TOOL_FOUND=1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user