From f08c1f52f3803d14685e5b0ebf03ea92f38dd6a0 Mon Sep 17 00:00:00 2001 From: Mikhail Zholobov Date: Sun, 22 Nov 2015 12:30:00 +0200 Subject: [PATCH] Fix grep character class syntax in sshd.sh script --- scripts/common/sshd.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/common/sshd.sh b/scripts/common/sshd.sh index b12fd57f9..1bb16f56e 100644 --- a/scripts/common/sshd.sh +++ b/scripts/common/sshd.sh @@ -6,14 +6,14 @@ SSHD_CONFIG="/etc/ssh/sshd_config" sed -i -e '$a\' "$SSHD_CONFIG" USEDNS="UseDNS no" -if grep -q -E "^[:space:]*UseDNS" "$SSHD_CONFIG"; then +if grep -q -E "^[[:space:]]*UseDNS" "$SSHD_CONFIG"; then sed -i "s/^\s*UseDNS.*/${USEDNS}/" "$SSHD_CONFIG" else echo "$USEDNS" >>"$SSHD_CONFIG" fi GSSAPI="GSSAPIAuthentication no" -if grep -q -E "^[:space:]*GSSAPIAuthentication" "$SSHD_CONFIG"; then +if grep -q -E "^[[:space:]]*GSSAPIAuthentication" "$SSHD_CONFIG"; then sed -i "s/^\s*GSSAPIAuthentication.*/${GSSAPI}/" "$SSHD_CONFIG" else echo "$GSSAPI" >>"$SSHD_CONFIG"