[omd-devel] Patch for omd xinetd rc script

Mathias Kettner mk at mathias-kettner.de
Wed Oct 24 09:35:50 CEST 2012


Hi,

thanks for your mail. I've fixed this, just in a bit other way:

test "$(ls -A ###ROOT###/etc/xinetd.d/)" || exit 5

The advantage: In your case if a broken symlink lies in the
directory, then xinetd wouldn't be started. Also the upper
solution is faster (no loop). Thanks for your qualified
feedback, anyway!

Greetings,

Mathias


Am 24.10.2012 00:48, schrieb wolvverine:
> Problem:
> + test -e /omd/sites/monitoring/etc/xinetd.d/check-mk-agent
> /omd/sites/monitoring/etc/xinetd.d/mk-livestatus
> /omd/sites/monitoring/etc/rc.d/90-xinetd.orig: line 6: test:
> /omd/sites/monitoring/etc/xinetd.d/check-mk-agent: binary operator expected
>
>
> --- 90-xinetd.orig2012-10-24 00:31:09.000000000 +0200
> +++ 90-xinetd2012-10-24 00:31:01.000000000 +0200
> @@ -1,8 +1,9 @@
>   #!/bin/bash
>   # Start only if at least on xinetd based service
>   # is activated
> -
> -test -e /omd/sites/monitoring/etc/xinetd.d/* || exit 5
> +for i in /omd/sites/monitoring/etc/xinetd.d/* ; do
> +test -e "${i}" || exit 5
> +done
>   PIDFILE=/omd/sites/monitoring/tmp/run/xinetd.pid
>   DAEMON=/usr/sbin/xinetd
>
>
>
> _______________________________________________
> omd-devel mailing list
> omd-devel at lists.mathias-kettner.de
> http://lists.mathias-kettner.de/mailman/listinfo/omd-devel
>


-- 
Mathias Kettner GmbH
Registergericht: Amtsgericht München,  HRB 165902
Firmensitz:      Kellerstraße 29, 81667 München
Geschäftsführer: Mathias Kettner

Tel. 089 / 1890 4210
Fax  089 / 1890 4211
http://mathias-kettner.de


More information about the omd-devel mailing list