[yocto] [yocto-autobuilder][PATCH] /bin/checkvnc

Graydon, Tracy tracy.graydon at intel.com
Tue Aug 15 14:53:06 PDT 2017


[Yocto #11897]

The checkvnc script uses deprecated netstat command for finding vnc sessions.
This breaks on Centos, and will break on other OS as it is removed in the
future.

Drop the dependency on netstat and instead grep /proc/net/tcp for
active sessions on 5901 port.

Signed-off-by: Graydon, Tracy <tracy.graydon at intel.com>
---
 bin/checkvnc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/checkvnc b/bin/checkvnc
index d934dfa..11e03bb 100755
--- a/bin/checkvnc
+++ b/bin/checkvnc
@@ -2,7 +2,7 @@
 #
 # check if vnc server is running, and if not, cleanup and restart
 #
-netstat -tnl | grep :5901 > /dev/null
+grep ':170D' /proc/net/tcp > /dev/null
 if [ $? != 0 ]; then
     echo "Xvnc not running, attempting restart"
     vncserver -kill :1
-- 
2.7.0




More information about the yocto mailing list