Optimize OS/release/version detection for faster execution #70

Merged
benpro merged 86 commits from fast-debian-check into master 2019-04-05 11:01:57 +02:00
Showing only changes of commit 00311e8f0e - Show all commits

View file

@ -1203,7 +1203,7 @@ fi
if [ "$IS_SSHPERMITROOTNO" = 1 ]; then
if is_debian_stretch; then
grep -q ^PermitRoot /etc/ssh/sshd_config && grep -E -qi "PermitRoot.*no" /etc/ssh/sshd_config \
grep -q "^PermitRoot" /etc/ssh/sshd_config && grep -E -qi "PermitRoot.*no" /etc/ssh/sshd_config \
|| failed "IS_SSHPERMITROOTNO"
else
grep -E -qi "PermitRoot.*no" /etc/ssh/sshd_config || failed "IS_SSHPERMITROOTNO"