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:
authormslifcak <slifcan@gmail.com>2018-01-17 17:56:19 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2018-01-17 17:56:19 +0300
commit173843bdfd009f856aca8c37b1c06d3ff5bea5e6 (patch)
tree1cae61d1f9dc0caf8c3db496e5bfcb95093a44a0 /lynis
parentbc571054c4de724811e6aa47347a028f323c1a39 (diff)
Pin svc mgr (#506)
* systemctl does not mean systemd is used * Check for systemd active * determine service manager if not already set
Diffstat (limited to 'lynis')
-rwxr-xr-xlynis14
1 files changed, 3 insertions, 11 deletions
diff --git a/lynis b/lynis
index 77ae1f3a..7d1a19fd 100755
--- a/lynis
+++ b/lynis
@@ -788,22 +788,14 @@ ${NORMAL}
#
#################################################################################
#
- # Check for systemd presence (already tested via binaries: systemctl)
- if [ ${HAS_SYSTEMD} -eq 0 ]; then
- FOUND=0
- # Backup option to do additional testing for systemd
- LIST="${ROOTDIR}lib/systemd/system"; for ITEM in ${LIST}; do if [ -d ${ITEM} ]; then FOUND=1; break; fi; done
- LIST="${ROOTDIR}usr/lib/systemd/systemd"
- if [ ${FOUND} -eq 0 ]; then for ITEM in ${LIST}; do if [ -f ${ITEM} ]; then FOUND=1; break; fi; done; fi
- else
- FOUND=1
- fi
- if [ ${FOUND} -eq 1 ]; then
+ # Check for systemd active
+ if [ -d /run/systemd/system ]; then
LogText "Result: system is using systemd"
HAS_SYSTEMD=1
Report "systemd=1"
else
LogText "Result: systemd not found"
+ HAS_SYSTEMD=0
Report "systemd=0"
fi
#