All of lore.kernel.org
 help / color / mirror / Atom feed
* [yocto-autobuilder][PATCH] /bin/checkvnc
@ 2016-09-09 20:15 Graydon, Tracy
  2016-09-09 22:02 ` Graydon, Tracy
  0 siblings, 1 reply; 4+ messages in thread
From: Graydon, Tracy @ 2016-09-09 20:15 UTC (permalink / raw)
  To: yocto

Script was using /bin/sh and causing an error in nightly-oe-selftest build:
/home/pokybuild/yocto-autobuilder/bin/checkvnc: 6: /home/pokybuild/yocto-autobuilder/bin/checkvnc: [[: not found

Changing script to use /bin/bash instead fixes the issue.

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

diff --git a/bin/checkvnc b/bin/checkvnc
index 574ba48..11b1a41 100755
--- a/bin/checkvnc
+++ b/bin/checkvnc
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # check if vnc server is running, and if not, cleanup and restart
 #
-- 
2.7.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [yocto-autobuilder][PATCH] /bin/checkvnc
  2016-09-09 20:15 [yocto-autobuilder][PATCH] /bin/checkvnc Graydon, Tracy
@ 2016-09-09 22:02 ` Graydon, Tracy
  0 siblings, 0 replies; 4+ messages in thread
From: Graydon, Tracy @ 2016-09-09 22:02 UTC (permalink / raw)
  To: yocto@yoctoproject.org

On second thought… Forget this one. I will submit a new patch that
un-bashifies it. That would be the “right” thing to do.

-t

On 09/09/16, 1:15 PM, "yocto-bounces@yoctoproject.org on behalf of
Graydon, Tracy" <yocto-bounces@yoctoproject.org on behalf of
tracy.graydon@intel.com> wrote:

>Script was using /bin/sh and causing an error in nightly-oe-selftest
>build:
>/home/pokybuild/yocto-autobuilder/bin/checkvnc: 6:
>/home/pokybuild/yocto-autobuilder/bin/checkvnc: [[: not found
>
>Changing script to use /bin/bash instead fixes the issue.
>
>Signed-off-by: Graydon, Tracy <tracy.graydon@intel.com>
>---
> bin/checkvnc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/bin/checkvnc b/bin/checkvnc
>index 574ba48..11b1a41 100755
>--- a/bin/checkvnc
>+++ b/bin/checkvnc
>@@ -1,4 +1,4 @@
>-#!/bin/sh
>+#!/bin/bash
> #
> # check if vnc server is running, and if not, cleanup and restart
> #
>-- 
>2.7.0
>
>-- 
>_______________________________________________
>yocto mailing list
>yocto@yoctoproject.org
>https://lists.yoctoproject.org/listinfo/yocto
>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [yocto-autobuilder][PATCH] /bin/checkvnc
@ 2017-08-15 21:53 Graydon, Tracy
  2017-08-16 11:13 ` Joshua Lock
  0 siblings, 1 reply; 4+ messages in thread
From: Graydon, Tracy @ 2017-08-15 21:53 UTC (permalink / raw)
  To: yocto; +Cc: joshua.g.lock

[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@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



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [yocto-autobuilder][PATCH] /bin/checkvnc
  2017-08-15 21:53 Graydon, Tracy
@ 2017-08-16 11:13 ` Joshua Lock
  0 siblings, 0 replies; 4+ messages in thread
From: Joshua Lock @ 2017-08-16 11:13 UTC (permalink / raw)
  To: Graydon, Tracy, yocto

Thanks, queued for merge (after tweaking the commit message some)

Joshua

On 15/08/17 22:53, Graydon, Tracy wrote:
> [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@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
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-08-16 11:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-09 20:15 [yocto-autobuilder][PATCH] /bin/checkvnc Graydon, Tracy
2016-09-09 22:02 ` Graydon, Tracy
  -- strict thread matches above, loose matches on Subject: below --
2017-08-15 21:53 Graydon, Tracy
2017-08-16 11:13 ` Joshua Lock

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.