Hello Simon,

Thank you very much for your patch. However, I think the init script you
are talking about is not maintained by the OpenVAS project (at least I
was not able to find it in the current SVN).

Which distribution are you using? Things like init scripts are most
likely maintained by the person who has prepare the OpenVAS packages for
your distribution, I am sure they would appreciate your patch.

Regards,


Michael

* Simon Deziel [14. Nov 2012]:
> Hi all,
> 
> I noticed the init script for greenbone-security-assistant had a broken
> "status" command so here's a patch that fixes it.
> 
> Prior patching:
> 
> root@vas01:~# bash -x /etc/init.d/greenbone-security-assistant status
> ...
> + '[' '!' -f /var/run/gsad.pid ']'
> ++ cat /var/run/gsad.pid
> + pid=14052
> + '[' -z 14052 ']'
> + '[' '!' -d /proc/14052 ']'
> ++ cut -d : -f 1
> ++ head -n 1
> ++ tr '\000' '\n'
> ++ cat /proc/14052/cmdline
> + cmd=/usr/sbin/gsad
> + '[' /usr/sbin/gsad '!=' gsad ']'
> + return 1
> + echo ' not running.'
>  not running.
> + exit 1
> 
> After:
> 
> root@vas01:~# bash -x /etc/init.d/greenbone-security-assistant status
> ...
> + '[' '!' -f /var/run/gsad.pid ']'
> ++ cat /var/run/gsad.pid
> + pid=14052
> + '[' -z 14052 ']'
> + '[' '!' -d /proc/14052 ']'
> ++ cut -d : -f 1
> ++ head -n 1
> ++ tr '\000' '\n'
> ++ cat /proc/14052/cmdline
> + cmd=/usr/sbin/gsad
> + '[' /usr/sbin/gsad '!=' /usr/sbin/gsad ']'
> + return 0
> + echo running
> running
> + exit 0
> 
> Regards,
> Simon

> --- /etc/init.d/greenbone-security-assistant-orig     2012-11-13 
> 17:50:07.184473506 -0500
> +++ /etc/init.d/greenbone-security-assistant  2012-11-13 17:50:22.996473505 
> -0500
> @@ -40,7 +40,7 @@
>  
>  DAEMON=/usr/sbin/gsad
>  PIDFILE=/var/run/gsad.pid
> -NAME=gsad
> +NAME=/usr/sbin/gsad
>  LABEL="Greenbone Security Assistant"
>  
>  test -x $DAEMON || exit 0

> _______________________________________________
> Openvas-devel mailing list
> Openvas-devel@wald.intevation.org
> https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-devel


-- 
Michael Wiegand |  Greenbone Networks GmbH  |  http://www.greenbone.net/
Neuer Graben 17, 49074 Osnabrück, Germany | AG Osnabrück, HR B 202460
Executive Directors: Lukas Grunwald, Dr. Jan-Oliver Wagner

_______________________________________________
Openvas-devel mailing list
Openvas-devel@wald.intevation.org
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-devel

Reply via email to