[Usbmount-commit] r4 - in trunk/usbmount: . debian

Rafael Laboissiere rafael@costa.debian.org
Wed, 16 Mar 2005 08:28:19 +0100


Author: rafael
Date: 2005-03-16 08:28:19 +0100 (Wed, 16 Mar 2005)
New Revision: 4

Removed:
   trunk/usbmount/debian/bug/
   trunk/usbmount/debian/dirs
Modified:
   trunk/usbmount/README
   trunk/usbmount/debian/changelog
   trunk/usbmount/debian/control
   trunk/usbmount/debian/copyright
   trunk/usbmount/debian/install
   trunk/usbmount/debian/prerm
   trunk/usbmount/usbmount
Log:
Release 0.0.6

Modified: trunk/usbmount/README
===================================================================
--- trunk/usbmount/README	2005-03-16 07:22:54 UTC (rev 3)
+++ trunk/usbmount/README	2005-03-16 07:28:19 UTC (rev 4)
@@ -8,7 +8,7 @@
 multiple devices are plugged in, the first available mountpoint is
 automatically selected.
 
-If the device provides a model name, a symlink /var/usbmount/MODELNAME
+If the device provides a model name, a symlink /var/run/usbmount/MODELNAME
 pointing to the mountpoint is automatically created.
 
 The comments in the configuration file /etc/usbmount.conf describe how

Modified: trunk/usbmount/debian/changelog
===================================================================
--- trunk/usbmount/debian/changelog	2005-03-16 07:22:54 UTC (rev 3)
+++ trunk/usbmount/debian/changelog	2005-03-16 07:28:19 UTC (rev 4)
@@ -1,3 +1,18 @@
+usbmount (0.0.6-1) unstable; urgency=low
+
+  * New upstream release:
+    - Changed maintainer's email address from <martin-deb@zero-based.org>
+      to <martin@zero-based.org>.
+    - Create symlink in /var/run/usbmount instead of /var/usbmount. If the
+      directory /var/run/usbmount does not exist, it is created when a device
+      is plugged in.
+  * Updated package description to mention that symlinks in
+    /var/run/usbmount are created.
+  * Removed instructions for 'reportbug' to send bug reports to the upstream
+    maintainer instead of the Debian BTS.
+
+ -- Martin Dickopp <martin@zero-based.org>  Tue,  8 Mar 2005 17:19:05 +0100
+
 usbmount (0.0.5-1) unstable; urgency=low
 
   * First upload of this package to the official Debian distribution

Modified: trunk/usbmount/debian/control
===================================================================
--- trunk/usbmount/debian/control	2005-03-16 07:22:54 UTC (rev 3)
+++ trunk/usbmount/debian/control	2005-03-16 07:28:19 UTC (rev 4)
@@ -1,7 +1,7 @@
 Source: usbmount
 Section: admin
 Priority: extra
-Maintainer: Martin Dickopp <martin-deb@zero-based.org>
+Maintainer: Martin Dickopp <martin@zero-based.org>
 Uploaders: Rafael Laboissiere <rafael@debian.org>
 Build-Depends-Indep: cdbs, debhelper (>= 4.1.0)
 Standards-Version: 3.6.1
@@ -15,8 +15,10 @@
  removed. The mountpoints (/media/usb[0-7] by default), filesystem types
  to consider, and mount options are configurable. When multiple devices
  are plugged in, the first available mountpoint is automatically
- selected.
+ selected. If the device provides a model name, a symbolic link
+ /var/run/usbmount/MODELNAME pointing to the mountpoint is automatically
+ created.
  .
  The script that does the (un)mounting is called by the udev daemon.
  .
- Homepage: http://www.zero-based.org/debian/usbmount.html
\ No newline at end of file
+ Homepage: http://www.zero-based.org/debian/usbmount.html

Modified: trunk/usbmount/debian/copyright
===================================================================
--- trunk/usbmount/debian/copyright	2005-03-16 07:22:54 UTC (rev 3)
+++ trunk/usbmount/debian/copyright	2005-03-16 07:28:19 UTC (rev 4)
@@ -1,5 +1,5 @@
 This package was written and debianized by Martin Dickopp
-<martin-deb@zero-based.org> on Tue, 26 Oct 2004 17:02:18 +0200.
+<martin@zero-based.org> on Tue, 26 Oct 2004 17:02:18 +0200.
 
 Copyright:
 

Deleted: trunk/usbmount/debian/dirs
===================================================================
--- trunk/usbmount/debian/dirs	2005-03-16 07:22:54 UTC (rev 3)
+++ trunk/usbmount/debian/dirs	2005-03-16 07:28:19 UTC (rev 4)
@@ -1 +0,0 @@
-var/usbmount

Modified: trunk/usbmount/debian/install
===================================================================
--- trunk/usbmount/debian/install	2005-03-16 07:22:54 UTC (rev 3)
+++ trunk/usbmount/debian/install	2005-03-16 07:28:19 UTC (rev 4)
@@ -1,4 +1,3 @@
 usbmount usr/share/usbmount
-debian/bug/* usr/share/bug/usbmount
 usbmount.dev etc/dev.d/block
 usbmount.conf etc

Modified: trunk/usbmount/debian/prerm
===================================================================
--- trunk/usbmount/debian/prerm	2005-03-16 07:22:54 UTC (rev 3)
+++ trunk/usbmount/debian/prerm	2005-03-16 07:28:19 UTC (rev 4)
@@ -10,9 +10,4 @@
     done
 fi
 
-# Remove any remaining symlinks in /var/usbmount.
-if test "$1" = remove; then
-    rm -f /var/usbmount/* 2> /dev/null || :
-fi
-
 exit 0

Modified: trunk/usbmount/usbmount
===================================================================
--- trunk/usbmount/usbmount	2005-03-16 07:22:54 UTC (rev 3)
+++ trunk/usbmount/usbmount	2005-03-16 07:28:19 UTC (rev 4)
@@ -45,6 +45,8 @@
     || { log err "cannnot execute /sbin/udev_volume_id"; exit 1; }
 
 
+umask 022
+
 if test "$ACTION" = add; then
 
     # A block or partition device has been added.
@@ -85,7 +87,7 @@
 		    log info "executing command: mount -t $fstype $options $DEVNAME $mountpoint"
 		    mount -t "$fstype" $options "$DEVNAME" "$mountpoint"
 
-		    # Create a symlink in /var/usbmount if the device
+		    # Create a symlink in /var/run/usbmount if the device
 		    # has a model name.
 		    model=
 		    if test -r "/sys$DEVPATH/device/model"; then
@@ -94,9 +96,15 @@
 			model="`cat \"/sys$DEVPATH/../device/model\"`"
 		    fi
 		    model="`echo \"$model\" | sed 's/^[ 	]*//; s/[ 	]*$//; s/[ 	]/_/g; s/[^0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._-]//g'`"
-		    if test "$model" != "" && ! test -r "/var/usbmount/$model"; then
-			log info "creating symlink /var/usbmount/$model -> $mountpoint"
-			ln -sf "$mountpoint" "/var/usbmount/$model"
+		    if test "$model" != ""; then
+			if ! test -d /var/run/usbmount; then
+			    log info "creating directory /var/run/usbmount"
+			    mkdir /var/run/usbmount
+			fi
+			if ! test -e "/var/run/usbmount/$model"; then
+			    log info "creating symlink /var/run/usbmount/$model -> $mountpoint"
+			    ln -sf "$mountpoint" "/var/run/usbmount/$model"
+			fi
 		    fi
 		else
 		    # No suitable mount point found.
@@ -126,9 +134,9 @@
 	fi
     done < /proc/mounts
 
-    # If a device has been unmounted, clean /var/usbmount.
-    if test $have_unmounted = yes; then
-	ls /var/usbmount | while read model; do
+    # If a device has been unmounted, clean /var/run/usbmount.
+    if test $have_unmounted = yes && test -d /var/run/usbmount; then
+	ls /var/run/usbmount | while read model; do
 	    mounted=no
 	    while read device mountpoint remainder; do
 		if test "`readlink $model`" = "$mountpoint"; then
@@ -140,8 +148,8 @@
 	    # If a symlink pointes to a directory which is not mounted,
 	    # remove it.
 	    if test $mounted = no; then
-		log info "removing /var/usbmount/$model"
-		rm -f "/var/usbmount/$model"
+		log info "removing /var/run/usbmount/$model"
+		rm -f "/var/run/usbmount/$model"
 	    fi
 	done
     fi