[Pkg-utopia-commits] r78 - packages/hal/trunk/debian

Sjoerd Simons sjoerd@haydn.debian.org
Tue, 16 Nov 2004 12:48:22 -0700


Author: sjoerd
Date: 2004-11-16 12:47:55 -0700 (Tue, 16 Nov 2004)
New Revision: 78

Added:
   packages/hal/trunk/debian/unmount.dev
Modified:
   packages/hal/trunk/debian/changelog
   packages/hal/trunk/debian/rules
Log:
Add Martin Pitt's umount script

Modified: packages/hal/trunk/debian/changelog
===================================================================
--- packages/hal/trunk/debian/changelog	2004-11-16 19:39:35 UTC (rev 77)
+++ packages/hal/trunk/debian/changelog	2004-11-16 19:47:55 UTC (rev 78)
@@ -4,6 +4,8 @@
   * Rename the hal dbus start script from hal to 20hal. Makes it simpler to 
     order startup of dbus services.
   * Let hald run as non-root by default
+  * Use a dev.d script for lazy device umount. So hald doesn't need too.
+    (Script from the ubuntu package)
 
  -- Sjoerd Simons <sjoerd@debian.org>  Mon,  8 Nov 2004 23:59:23 +0100
 

Modified: packages/hal/trunk/debian/rules
===================================================================
--- packages/hal/trunk/debian/rules	2004-11-16 19:39:35 UTC (rev 77)
+++ packages/hal/trunk/debian/rules	2004-11-16 19:47:55 UTC (rev 78)
@@ -22,3 +22,5 @@
 	install -m 755 debian/hal.init.dbus \
 		$(DEB_DESTDIR)/etc/dbus-1/event.d/20hal
 	rmdir $(DEB_DESTDIR)/usr/share/hal/fdi/95userpolicy
+	install -m 755 -D debian/unmount.dev \
+		$(DEB_DESTDIR)/etc/dev.d/default/unmount.dev

Added: packages/hal/trunk/debian/unmount.dev
===================================================================
--- packages/hal/trunk/debian/unmount.dev	2004-11-16 19:39:35 UTC (rev 77)
+++ packages/hal/trunk/debian/unmount.dev	2004-11-16 19:47:55 UTC (rev 78)
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# Lazily unmount drives which are removed, but still unmounted
+if [ "$ACTION" = remove ] && grep -q "^$DEVNAME" /proc/mounts; then
+    umount -l "$DEVNAME"
+fi
+
+exit 0