From 19781812496693bfa8844390d53fc17824a47778 Mon Sep 17 00:00:00 2001 From: Ivan Rako Date: Mon, 29 Jun 2009 14:42:21 +0200 Subject: [PATCH] ispravke u postinst/postrm --- debian/postinst | 8 +++++++- debian/postrm | 2 -- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/debian/postinst b/debian/postinst index 7c26f79..044b69b 100755 --- a/debian/postinst +++ b/debian/postinst @@ -25,11 +25,17 @@ server="$RET" if [ "$server" != "$ocsserver" ]; then db_set ocsinventory-agent/server "$ocsserver" + set_ocsserver="yes" fi cp_check_and_sed "^server" \ "s#^server.*#server=$ocsserver#g" \ - /etc/ocsinventory/ocsinventory-agent.cfg || true + /etc/ocsinventory/ocsinventory-agent.cfg \ + && set_ocsserver="yes" || true + +if [ "$set_ocsserver" = "yes" ]; then + echo "CN: OCS Inventory server: $ocsserver" +fi if ! grep -q ^server= /etc/ocsinventory/ocsinventory-agent.cfg; then echo "server=$ocsserver" >> /etc/ocsinventory/ocsinventory-agent.cfg diff --git a/debian/postrm b/debian/postrm index 23cc4e2..73291ab 100755 --- a/debian/postrm +++ b/debian/postrm @@ -3,8 +3,6 @@ set -e if [ "$1" = remove ]; then - rm -f /etc/init.d/amavis dpkg-divert --quiet --package ocsinventory-agent-cn --remove --rename \ - --divert /usr/share/perl5/Ocsinventory/Agent/Backend/OS/Generic/Hostname.pm.divert /usr/share/perl5/Ocsinventory/Agent/Backend/OS/Generic/Hostname.pm || true fi -- 1.7.10.4