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

Rogério Brito rbrito-guest at alioth.debian.org
Fri Dec 25 02:41:35 UTC 2009


Author: rbrito-guest
Date: 2009-12-25 02:41:35 +0000 (Fri, 25 Dec 2009)
New Revision: 80

Modified:
   usbmount/trunk/debian/changelog
   usbmount/trunk/usbmount
Log:
Change character classes :space: -> :blank: and anchor grep's regexp.


Modified: usbmount/trunk/debian/changelog
===================================================================
--- usbmount/trunk/debian/changelog	2009-12-24 15:15:43 UTC (rev 79)
+++ usbmount/trunk/debian/changelog	2009-12-25 02:41:35 UTC (rev 80)
@@ -1,3 +1,12 @@
+usbmount (0.0.19.1) unstable; urgency=low
+
+  * The "Oh, oh, oh" release.
+  * Hotfix a bug discovered by Gregor Herrmann. Closes: #562496.
+  * Change space character classes to blank, as suggested by Cristian
+    Ionescu-Idbohrn.
+
+ -- Rogério Brito <rbrito at ime.usp.br>  Fri, 25 Dec 2009 00:39:37 -0200
+
 usbmount (0.0.19) unstable; urgency=low
 
   * The "Ho, Ho, Ho" release.

Modified: usbmount/trunk/usbmount
===================================================================
--- usbmount/trunk/usbmount	2009-12-24 15:15:43 UTC (rev 79)
+++ usbmount/trunk/usbmount	2009-12-25 02:41:35 UTC (rev 80)
@@ -88,9 +88,9 @@
     #   FIXME: improvement: implement mounting by label (notice that labels
     #   can contain spaces, which makes things a little bit less comfortable).
     DEVINFO=$(/sbin/blkid -p $DEVNAME)
-    FSTYPE=$(echo "$DEVINFO" | sed 's/.*TYPE="\([^"]*\)".*/\1/g; s/[[:space:]]*//g;')
-    UUID=$(echo "$DEVINFO"   | sed 's/.*UUID="\([^"]*\)".*/\1/g; s/[[:space:]]*//g;')
-    USAGE=$(echo "$DEVINFO"  | sed 's/.*USAGE="\([^"]*\)".*/\1/g; s/[[:space:]]*//g;')
+    FSTYPE=$(echo "$DEVINFO" | sed 's/.*TYPE="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;')
+    UUID=$(echo "$DEVINFO"   | sed 's/.*UUID="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;')
+    USAGE=$(echo "$DEVINFO"  | sed 's/.*USAGE="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;')
 
     if ! echo $USAGE | egrep -q "(filesystem|disklabel)"; then
 	log info "$DEVNAME does not contain a filesystem or disklabel"
@@ -98,7 +98,7 @@
     fi
 
     # Try to use specifications in /etc/fstab first.
-    if egrep -q "[[:space:]]*$DEVNAME" /etc/fstab; then
+    if egrep -q "^[[:blank:]]*$DEVNAME" /etc/fstab; then
 	log info "executing command: mount $DEVNAME"
 	mount $DEVNAME
 
@@ -149,7 +149,7 @@
 		elif [ -r "/sys$DEVPATH/../device/../manufacturer" ]; then
 		    vendor="`cat \"/sys$DEVPATH/../device/../manufacturer\"`"
 		fi
-		vendor="$(echo "$vendor" | sed 's/^[[:space:]]\+//; s/[[:space:]]\+$//')"
+		vendor="$(echo "$vendor" | sed 's/^[[:blank:]]\+//; s/[[:blank:]]\+$//')"
 
 		model=
 		if [ -r "/sys$DEVPATH/device/model" ]; then
@@ -161,7 +161,7 @@
 		elif [ -r "/sys$DEVPATH/../device/../product" ]; then
 		    model="`cat \"/sys$DEVPATH/../device/../product\"`"
 		fi
-		model="$(echo "$model" | sed 's/^[[:space:]]\+//; s/[[:space:]]\+$//')"
+		model="$(echo "$model" | sed 's/^[[:blank:]]\+//; s/[[:blank:]]\+$//')"
 
 		# Run hook scripts; ignore errors.
 		export UM_DEVICE="$DEVNAME"




More information about the Usbmount-commit mailing list