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

Mike O'Connor stew at vireo.org
Tue Jan 23 19:27:37 CET 2007

Package: nagios2-common
Version: 2.6-2
Severity: serious
Tags: patch
Justification: prevents package installation

*** Please type your report below this line *** This is the first time
I've tried to install nagios2, the installation fails to configure
nagios2-common, here is the error:

:) stew at catfish:~ $ sudo dpkg --configure -a
Setting up nagios2-common (2.6-2) ...
Reloading web server config...3406
awk: can't open file FS==
 source line number 1
invoke-rc.d: initscript nagios2, action "start" failed.
dpkg: error processing nagios2-common (--configure):
 subprocess post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of nagios2:
 nagios2 depends on nagios2-common (= 2.6-2); however:
  Package nagios2-common is not configured yet.
dpkg: error processing nagios2 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:


and here is a patch which fixes the init script:

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
-THEPIDFILE="$(grep lock_file $NAGIOSCFG | awk '{print $2}' FS="=")"
+THEPIDFILE="$(grep lock_file $NAGIOSCFG | awk 'BEGIN{FS="="}{print $2}')"
 [ -n "$THEPIDFILE" ] || THEPIDFILE='/var/run/nagios2/nagios.pid'
 [ -e "$THEPIDFILE" ] && PID=$(cat $THEPIDFILE)



-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-1-amd64
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages nagios2-common depends on:
ii  adduser          3.99                    Add and remove users and groups
ii  apache2          2.2.3-3.1               Next generation, scalable, extenda
ii  apache2-mpm-pref 2.2.3-3.1               Traditional model for Apache HTTPD
ii  coreutils        5.97-5.1                The GNU core utilities
ii  debconf [debconf 1.5.8                   Debian configuration management sy
ii  lsb-base         3.1-19                  Linux Standard Base 3.1 init scrip
ii  mailx            1:8.1.2-0.20050715cvs-1 A simple mail user agent
ii  nagios-plugins-b 1.4.5-2                 Plugins for the nagios network mon
ii  nagios2-doc      2.6-2                   documentation for nagios2
ii  ucf              2.0016                  Update Configuration File: preserv

Versions of packages nagios2-common recommends:
ii  nagios-images                 0.3        Collection of images and icons for
ii  nagios-plugins                1.4.5-2    Plugins for the nagios network mon

-- debconf information excluded

More information about the Pkg-nagios-devel mailing list