[Oval-commits] r241 - trunk/oval-agent/debian

Javier Fernandez-Sanguino Pen~a jfs at alioth.debian.org
Tue Sep 4 19:50:52 UTC 2007


Author: jfs
Date: 2007-09-04 19:50:52 +0000 (Tue, 04 Sep 2007)
New Revision: 241

Added:
   trunk/oval-agent/debian/postrm
Modified:
   trunk/oval-agent/debian/rules
Log:
Remove user when the package is removed

Added: trunk/oval-agent/debian/postrm
===================================================================
--- trunk/oval-agent/debian/postrm	                        (rev 0)
+++ trunk/oval-agent/debian/postrm	2007-09-04 19:50:52 UTC (rev 241)
@@ -0,0 +1,59 @@
+#!/bin/sh
+# postrm script for oval-agent
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <overwriter>
+#          <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+OVALSERVER=`dpkg -l | grep oval-server | awk '{print $1}'`
+
+case "$1" in
+    purge)
+   	rm -rf /var/cache/oval-agent
+    ;;
+
+    remove)
+	if [ "OVALSERVER" != "ii" ]; then
+		rm -rf /var/log/oval
+	else
+		rm -rf /var/log/oval/oval-agent.log
+	fi
+	
+	if [ "OVALSERVER" != "ii" ]; then
+		if id oval >/dev/null; then
+			deluser oval
+		fi
+	fi
+    ;;
+
+    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+    ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+

Modified: trunk/oval-agent/debian/rules
===================================================================
--- trunk/oval-agent/debian/rules	2007-09-04 19:49:59 UTC (rev 240)
+++ trunk/oval-agent/debian/rules	2007-09-04 19:50:52 UTC (rev 241)
@@ -48,27 +48,24 @@
 	dh_testroot
 	dh_installdocs
 	dh_installexamples
-	dh_installman
+	dh_installman oval-agent.1
 #	dh_installmenu
 #	dh_installdebconf	
 #	dh_installlogrotate
-#	dh_installemacsen
-#	dh_installpam
-#	dh_installmime
-#	dh_python
+	dh_pysupport
+	dh_python
 #	dh_installcron
 #	dh_installinfo
 	
 	for i in oval-agent; \
 		do mv debian/oval-agent/usr/bin/$$i.py debian/oval-agent/usr/bin/$$i; done
-	dh_installchangelogs --name=oval-agent
-	dh_installinit
+	dh_installchangelogs 
 	dh_install
 	dh_link
-	dh_strip
+#	dh_strip
 	dh_compress
 	dh_fixperms
-#	dh_perl
+	dh_installinit --name=oval-agent
 #	dh_makeshlibs
 	dh_installdeb
 	dh_shlibdeps




More information about the Oval-commits mailing list