From afa2d50aac6b3d76b99d1d46b9c68c17d2376875 Mon Sep 17 00:00:00 2001 From: mboelen Date: Wed, 10 Dec 2014 11:08:15 +0100 Subject: [PATCH] Improved screen output on FreeBSD and enhanced version detection on Gentoo --- include/osdetection | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/include/osdetection b/include/osdetection index 1358fa98..7ebf3654 100644 --- a/include/osdetection +++ b/include/osdetection @@ -5,8 +5,8 @@ # Lynis # ------------------ # -# Copyright 2007-2014, Michael Boelen (michael@rootkit.nl), The Netherlands -# Web site: http://www.rootkit.nl +# Copyright 2007-2015, Michael Boelen, CISOfy (michael.boelen@cisofy.com) +# Web site: https://cisofy.com # # This software is licensed under GPL, version 3. See LICENSE file for # usage of this software. @@ -167,9 +167,7 @@ # E-smith if [ -e "/etc/e-smith-release" ]; then OS_FULLNAME=`cat /etc/e-smith-release`; fi # Gentoo - if [ -e "/etc/gentoo-release" ]; then OS_FULLNAME=`cat /etc/gentoo-release | awk '{ print $5 }' | cut -d '.' -f1,2`; fi - - + if [ -e "/etc/gentoo-release" ]; then OS_FULLNAME=`cat /etc/gentoo-release`; fi # Red Hat and others if [ -e "/etc/redhat-release" ]; then @@ -361,7 +359,7 @@ case ${OS} in "AIX") ECHOCMD="echo" ;; - "DragonFly") ECHOCMD="echo -e"; ECHONB="echo -n" ;; + "DragonFly"|"FreeBSD"|"NetBSD") ECHOCMD="echo -e"; ECHONB="echo -n" ;; "MacOS") ECHOCMD="echo" ;; "Solaris") ECHOCMD="echo" ;; "Linux") @@ -372,10 +370,9 @@ *) ECHOCMD="echo -e" ;; esac ;; - "NetBSD") ECHOCMD="echo -e"; ECHONB="echo -n" ;; *) ECHOCMD="echo -e" ;; esac #================================================================================ -# Lynis - Copyright 2007-2014 Michael Boelen, CISOfy - https://cisofy.com +# Lynis - Copyright 2007-2015 Michael Boelen, CISOfy - https://cisofy.com