Bug#408136: [Pkg-nagios-devel] Bug#408136: error in /etc/init.d/nagios2 prevents installation of nagios2-common

Marc Haber mh+debian-packages at zugschlus.de
Fri Jan 26 16:56:57 CET 2007


On Tue, Jan 23, 2007 at 01:27:37PM -0500, Mike O'Connor wrote:
> diff -ru nagios2-2.6.orig/debian/nagios2-common.nagios2.init nagios2-2.6/debian/nagios2-common.nagios2.init
> --- nagios2-2.6.orig/debian/nagios2-common.nagios2.init 2007-01-23 13:26:04.000000000 -0500
> +++ nagios2-2.6/debian/nagios2-common.nagios2.init      2007-01-23 13:26:17.000000000 -0500
> @@ -114,7 +114,7 @@
>    exit 6
>  fi
>  
> -THEPIDFILE="$(grep lock_file $NAGIOSCFG | awk '{print $2}' FS="=")"
> +THEPIDFILE="$(grep lock_file $NAGIOSCFG | awk 'BEGIN{FS="="}{print $2}')"

Would you be satisfied with
awk -v FS="=" '{print $2}'
as well?

I seem to have inadvertently used a construction that is not awk
standard, but mawk and gawk handle it just fine. The -v stuff should
be standard-compliant, isn't it?

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 72739835




More information about the Pkg-nagios-devel mailing list