/bin/checkvnc
PATCH 1/1 /bin/checkvnc
[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 <[email protected]>
--- bin/checkvnc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
bin/checkvnc +1 -1
@@ -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
Signature · 1 line
2.7.0
Thanks, queued for merge (after tweaking the commit message some)
Joshua
Quoted 28 lines · Tracy
[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/tcpfor active sessions on 5901 port.Signed-off-by Graydon, Tracy <[email protected]>--- bin/checkvnc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)bin/checkvnc +1
-1@@ -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