ispravke u postinst/postrm
authorIvan Rako <irako@nekkar.carnet.hr>
Mon, 29 Jun 2009 12:42:21 +0000 (14:42 +0200)
committerIvan Rako <irako@nekkar.carnet.hr>
Mon, 29 Jun 2009 12:42:21 +0000 (14:42 +0200)
debian/postinst
debian/postrm

index 7c26f79..044b69b 100755 (executable)
@@ -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
index 23cc4e2..73291ab 100755 (executable)
@@ -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