[Utopia] GVM: use pmount if available



Lately I tried to get a decent Gentoo ebuild working for gvm 1.3.2 using
pmount, but failed doing so (for some obscure gentoo-internal reason,
but well).

I ended up with writing a little patch for configure.in that checks
whether pmount is available on the system, and uses that one instead of
plain mount/umount. Of course a custom mount command is still supported
(not that much changed actually).

Patch attached, I can apply it myself if accepted.

Ikke
http://www.eikke.com
? .configure.in.swp
? gvm-use-pmount-if-available.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-volume-manager/ChangeLog,v
retrieving revision 1.173
diff -u -b -B -r1.173 ChangeLog
--- ChangeLog	8 Aug 2005 16:03:54 -0000	1.173
+++ ChangeLog	8 Aug 2005 18:10:06 -0000
@@ -1,3 +1,7 @@
+2005-08-08  Nicolas Trangez  <eikke eikke com>
+
+	* configure.in: detect pmount and use it per default
+
 2005-08-08  Jeffrey Stedfast  <fejj novell com>
 
 	* src/manager.c (mount_all): Fixed some if-logic.
Index: configure.in
===================================================================
RCS file: /cvs/gnome/gnome-volume-manager/configure.in,v
retrieving revision 1.94
diff -u -b -B -r1.94 configure.in
--- configure.in	3 Aug 2005 17:52:49 -0000	1.94
+++ configure.in	8 Aug 2005 18:10:06 -0000
@@ -8,14 +8,28 @@
 AC_PROG_CC
 
 AC_PATH_PROG(mount_path, mount, mount)
+AC_PATH_PROG(pmount_hal_path, pmount-hal, NOTFOUND)
 AC_PATH_PROG(umount_path, umount, umount)
+AC_PATH_PROG(pumount_path, pumount, NOTFOUND)
+
+if test ! x$pmount_hal_path = xNOTFOUND; then
+        mount_path="${pmount_hal_path} %h"
+else
+        mount_path="${mount_path} %d"
+fi
+
+if test ! x$pumount_path = xNOTFOUND; then
+        umount_path="${pumount_path} %d"
+else
+        umount_path="${umount_path} %d"
+fi
 
 AC_ARG_WITH(mount-command, AC_HELP_STRING(--with-mount-command], [Command to invoke in order to mount a device]), 
-            mount_command="$withval", mount_command="${mount_path} %d")
+            mount_command="$withval", mount_command="${mount_path}")
 AC_DEFINE_UNQUOTED([MOUNT_COMMAND], ["${mount_command}"], [mount command])
 
 AC_ARG_WITH(unmount-command, AC_HELP_STRING(--with-unmount-command], [Command to invoke in order to unmount a device]), 
-            unmount_command="$withval", unmount_command="${umount_path} %d")
+            unmount_command="$withval", unmount_command="${umount_path}")
 AC_DEFINE_UNQUOTED([UNMOUNT_COMMAND], ["${unmount_command}"], [unmount command])
 
 AC_PATH_PROG(nautilus_path, nautilus, nautilus)
Index: src/manager.c
===================================================================
RCS file: /cvs/gnome/gnome-volume-manager/src/manager.c,v
retrieving revision 1.72
diff -u -b -B -r1.72 manager.c


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]