瀏覽代碼

Two separate conditions

Bob Mottram 6 年之前
父節點
當前提交
719b813157
共有 1 個檔案被更改,包括 6 行新增2 行删除
  1. 6
    2
      tests/check-ssh.sh

+ 6
- 2
tests/check-ssh.sh 查看文件

@@ -47,8 +47,12 @@ case $1 in
47 47
     installed)
48 48
 	OPENSSH_SERVER=$(dpkg -s openssh-server | grep -i "Status:.*install.*ok.*installed" | wc -l)
49 49
 	OPENSSH_CLIENT=$(dpkg -s openssh-client | grep -i "Status:.*install.*ok.*installed" | wc -l)
50
-	if [ ${OPENSSH_SERVER} -eq 1 -a ${OPENSSH_CLIENT} -eq 1 ]; then
51
-	    :
50
+	if [ ${OPENSSH_SERVER} -eq 1 ]; then
51
+	    if [ ${OPENSSH_CLIENT} -eq 1 ]; then
52
+		:
53
+	    else
54
+		exit 1
55
+	    fi
52 56
 	else
53 57
 	    exit 1
54 58
 	fi