[Pkg-nagios-changes] [pkg-nagios] r1087 - nagios2/trunk/debian
Marc Haber
zugschlus at alioth.debian.org
Fri Dec 15 13:11:43 CET 2006
Author: zugschlus
Date: 2006-12-15 13:11:43 +0100 (Fri, 15 Dec 2006)
New Revision: 1087
Modified:
nagios2/trunk/debian/changelog
nagios2/trunk/debian/nagios2-common.postinst
nagios2/trunk/debian/nagios2-common.postrm
Log:
* nagios2-common.postrm: Send dpkg-statoverride standard error to
the bin to avoid a row of "No override present" error messages on
purge.
Modified: nagios2/trunk/debian/changelog
===================================================================
--- nagios2/trunk/debian/changelog 2006-12-15 12:04:21 UTC (rev 1086)
+++ nagios2/trunk/debian/changelog 2006-12-15 12:11:43 UTC (rev 1087)
@@ -4,8 +4,12 @@
* new german debconf translations from Matthias Julius (closes: #400700).
* remove check_dns from comands.cfg.
Thanks to Dr. Tilo Levante. Closes: #402303
+ * nagios2-common.postinst: Take 127.0.0.1 as default default gateway.
+ * nagios2-common.postrm: Send dpkg-statoverride standard error to
+ the bin to avoid a row of "No override present" error messages on
+ purge.
- -- Marc Haber <mh+debian-packages at zugschlus.de> Fri, 15 Dec 2006 13:03:18 +0100
+ -- Marc Haber <mh+debian-packages at zugschlus.de> Fri, 15 Dec 2006 13:10:21 +0100
nagios2 (2.6-1) unstable; urgency=low
Modified: nagios2/trunk/debian/nagios2-common.postinst
===================================================================
--- nagios2/trunk/debian/nagios2-common.postinst 2006-12-15 12:04:21 UTC (rev 1086)
+++ nagios2/trunk/debian/nagios2-common.postinst 2006-12-15 12:11:43 UTC (rev 1087)
@@ -43,7 +43,7 @@
# get the list of selected servers
db_get nagios2/httpd
- servers=`echo $RET | sed -e 's/,/ /g'`
+ servers=$(echo $RET | sed -e 's/,/ /g')
db_get nagios2/adminpassword
admpass="$RET"
# get whether they want support for 1.x urls:
@@ -58,9 +58,13 @@
fi
# and do some voodoo to detect default gw and make a host of it
- tmpgw=`mktemp`
- set -- `route -n | grep '^0.0.0.0' | head -n1`
+ tmpgw=$(mktemp)
+ set -- $(route -n 2>/dev/null| grep '^0.0.0.0' | head -n1)
DEFAULTGW=$2
+ if [ -z "$DEFAULTGW" ]; then
+ echo "WARN: no default gateway found (/proc not mounted?). Selecting 127.0.0.1 as default gatway"
+ DEFAULTGW="127.0.0.1"
+ fi
sed -e "s,GW,$DEFAULTGW," $usn/debian/gateway.cfg > $tmpgw
chmod 644 $tmpgw
ucf $tmpgw $enc/host-gateway_nagios2.cfg
@@ -72,7 +76,7 @@
if [ "$servers" ]; then
wc_httpd_apache_include $apacheconf nagios2 $servers
# reload the selected servers if they are running
- running_servers="`wc_httpd_running $servers`"
+ running_servers="$(wc_httpd_running $servers)"
if [ "$running_servers" ]; then
wc_httpd_invoke "reload" $running_servers
fi
Modified: nagios2/trunk/debian/nagios2-common.postrm
===================================================================
--- nagios2/trunk/debian/nagios2-common.postrm 2006-12-15 12:04:21 UTC (rev 1086)
+++ nagios2/trunk/debian/nagios2-common.postrm 2006-12-15 12:11:43 UTC (rev 1087)
@@ -11,7 +11,7 @@
purge)
for file in $en/resource.cfg /var/log/nagios2 /var/run/nagios2 \
/var/lib/nagios2 /var/cache/nagios2 /var/lib/nagios2/rw; do
- dpkg-statoverride --force --remove $file || true
+ dpkg-statoverride --force --remove $file 2>/dev/null || true
done
rm -rf /var/run/nagios2 /var/log/nagios2 /var/lib/nagios2 \
/var/cache/nagios2
More information about the Pkg-nagios-changes
mailing list