浏览代码

Two separate conditions

Bob Mottram 7 年前
父节点
当前提交
719b813157
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6
    2
      tests/check-ssh.sh

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

47
     installed)
47
     installed)
48
 	OPENSSH_SERVER=$(dpkg -s openssh-server | grep -i "Status:.*install.*ok.*installed" | wc -l)
48
 	OPENSSH_SERVER=$(dpkg -s openssh-server | grep -i "Status:.*install.*ok.*installed" | wc -l)
49
 	OPENSSH_CLIENT=$(dpkg -s openssh-client | grep -i "Status:.*install.*ok.*installed" | wc -l)
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
 	else
56
 	else
53
 	    exit 1
57
 	    exit 1
54
 	fi	
58
 	fi