[Pkg-grid-commits] nws/debian nws.postrm,1.1,1.2

Martin Quinson mquinson at alioth.debian.org
Mon Aug 8 21:26:04 UTC 2005


Update of /cvsroot/pkg-grid/nws/debian
In directory haydn:/tmp/cvs-serv4314

Modified Files:
	nws.postrm 
Log Message:
Purge the user, statoverrides and status files on package purge

Index: nws.postrm
===================================================================
RCS file: /cvsroot/pkg-grid/nws/debian/nws.postrm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- nws.postrm	29 Jun 2004 21:59:34 -0000	1.1
+++ nws.postrm	8 Aug 2005 21:26:02 -0000	1.2
@@ -7,10 +7,28 @@
  
 case "$1" in
 	purge)
+	        ####
+	        ## Purge UCF
 		if [ -x /usr/bin/ucf ]; then
 			ucf --purge $CONF
 		fi
 		rm -f $CONF
+		
+		####
+		## Purge the user
+		deluser --quiet nws > /dev/null || true
+		
+		####
+		## Purge the statoverrides
+                for i in /var/log/nws /var/state/nws ; do
+                  if ! dpkg-statoverride --list $i >/dev/null; then
+                    dpkg-statoverride --remove $i
+                  fi
+		done
+
+                ####
+		## Purge the status and log files
+		rm -rf /var/log/nws /var/state/nws
 	;;
 esac
 




More information about the Pkg-grid-commits mailing list