]> git.proxmox.com Git - swtpm.git/commitdiff
Only list LISTEN sockets when checking on tcsd
authorStefan Berger <stefanb@linux.vnet.ibm.com>
Thu, 12 Mar 2015 18:21:55 +0000 (14:21 -0400)
committerStefan Berger <stefanb@linux.vnet.ibm.com>
Thu, 12 Mar 2015 18:21:59 +0000 (14:21 -0400)
Only list LISTEN sockets when checking whether tcsd has started
listening on a socket, yet.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
src/swtpm_setup/swtpm_setup.sh

index 45131ac0907578808bb7a5839f41758cacf0368c..e7e3cd091e3cf540dd8d4be3d0cd72687b7b8814 100755 (executable)
@@ -316,7 +316,8 @@ EOF
                        fi
 
                        # Did tcsd open the TCP port yet?
-                       if [ -n "$(netstat -napt 2>/dev/null | 
+                       if [ -n "$(netstat -naptl 2>/dev/null | 
+                                  grep "LISTEN" |
                                   grep " $TCSD_PID/" |
                                   grep ":$TSS_TCSD_PORT ")" ]; then
                                echo "TSS is listening on TCP port $TSS_TCSD_PORT."