[Pkg-nagios-changes] [SCM] debian packaging of icinga(-core) branch, master, updated. debian/1.8.4-1-2-gc732717
Alexander Wirt
formorer at debian.org
Mon Feb 11 21:12:49 UTC 2013
The following commit has been merged in the master branch:
commit c732717ec40cc2ab658157575cd49135c2769ce7
Author: Alexander Wirt <formorer at debian.org>
Date: Mon Feb 11 22:10:51 2013 +0100
Don't destroy symlinked icinga configs with sed
Closes: #698137
diff --git a/debian/icinga-common.postinst b/debian/icinga-common.postinst
index fe8648c..046a173 100644
--- a/debian/icinga-common.postinst
+++ b/debian/icinga-common.postinst
@@ -67,8 +67,6 @@ case "$1" in
;;
esac
- cp -a -f "$conffile" "$conffile".tmp
-
# If the admin deleted or commented some variables but then set
# them via debconf, (re-)add them to the config file.
@@ -76,11 +74,8 @@ case "$1" in
grep -Eq '^ *check_external_commands=' "$conffile" || \
echo "check_external_commands=" >> "$conffile"
- sed -e "s|^ *check_external_commands=.*|check_external_commands=$check_external_commands|" \
- < "$conffile" > "$conffile.tmp"
-
- mv -f "$conffile".tmp "$conffile"
-
+ sed --follow-symlinks -i -e "s|^ *check_external_commands=.|check_external_commands=$check_external_commands|" \
+ "$conffile"
# Stop a not already stopped icinga instance,
# debhelper will start it again automatically at the bottom
status="$(/etc/init.d/icinga status >/dev/null 2>&1; echo $?)"
--
debian packaging of icinga(-core)
More information about the Pkg-nagios-changes
mailing list