From: Ivan Rako Date: Mon, 29 Jun 2009 12:42:21 +0000 (+0200) Subject: ispravke u postinst/postrm X-Git-Tag: debian/1.1.1-1~4 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=19781812496693bfa8844390d53fc17824a47778;p=ocsinventory-agent-cn.git ispravke u postinst/postrm --- 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