mirror of https://github.com/CISOfy/lynis.git
Redirect sysctl errors properly
This commit is contained in:
parent
f8f4862244
commit
94607e4ae4
|
@ -623,7 +623,7 @@
|
||||||
|
|
||||||
# NetBSD: machdep.dmi.system-product
|
# NetBSD: machdep.dmi.system-product
|
||||||
# OpenBSD: hw.product
|
# OpenBSD: hw.product
|
||||||
SHORT=`sysctl -a | egrep "(hw.product|machdep.dmi.system-product)" 2> /dev/null | head -1 | sed 's/ = /=/' | awk -F= '{ print $2 }'`
|
SHORT=`sysctl -a 2> /dev/null | egrep "(hw.product|machdep.dmi.system-product)" | head -1 | sed 's/ = /=/' | awk -F= '{ print $2 }'`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if we catched some string along all tests
|
# Check if we catched some string along all tests
|
||||||
|
|
Loading…
Reference in New Issue