]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mount.fuse.ceph: add ceph-fuse mount helper
authorSage Weil <sage@inktank.com>
Wed, 12 Dec 2012 16:01:49 +0000 (08:01 -0800)
committerSage Weil <sage@inktank.com>
Thu, 13 Dec 2012 05:14:38 +0000 (21:14 -0800)
Signed-off-by: Sage Weil <sage@inktank.com>
ceph.spec.in
debian/ceph-fuse.install
src/Makefile.am
src/mount.fuse.ceph [new file with mode: 0755]

index 3a369cf5359854be37c1eba6a92990cf39c53071..ba1cce459bcc37dea74afd2d2d9b8b51ac234484 100644 (file)
@@ -356,6 +356,7 @@ fi
 %defattr(-,root,root,-)
 %{_bindir}/ceph-fuse
 %{_mandir}/man8/ceph-fuse.8*
+/sbin/mount.fuse.ceph
 
 #################################################################################
 %files devel
index b8dd3b32d63db7a28a9c7bf5254038e2b0a76c4c..79588d2a629ce12d3926fbc239b5003371f57c43 100644 (file)
@@ -1,2 +1,3 @@
 usr/bin/ceph-fuse
 usr/share/man/man8/ceph-fuse.8
+sbin/mount.fuse.ceph
index 64924d7bd508e69524cfe440fc818670239c78e1..2a874e716354c86a1da3c7c7f4e2b9b68ac96065 100644 (file)
@@ -29,7 +29,8 @@ sbin_PROGRAMS =
 sbin_SCRIPTS = \
        ceph-disk-prepare \
        ceph-disk-activate \
-       ceph-create-keys
+       ceph-create-keys \
+       mount.fuse.ceph
 bin_SCRIPTS = ceph-run $(srcdir)/ceph-clsinfo ceph-debugpack ceph-rbdnamer
 dist_bin_SCRIPTS =
 # C/C++ tests to build will be appended to this
@@ -1097,7 +1098,8 @@ EXTRA_DIST += \
        $(srcdir)/upstart/radosgw-all-starter.conf \
        ceph-disk-prepare \
        ceph-disk-activate \
-       ceph-create-keys
+       ceph-create-keys \
+       mount.fuse.ceph
 
 
 EXTRA_DIST += $(srcdir)/$(shell_scripts:%=%.in)
diff --git a/src/mount.fuse.ceph b/src/mount.fuse.ceph
new file mode 100755 (executable)
index 0000000..f579953
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+#
+# Helper to mount ceph-fuse from /etc/fstab.  To use, add an entry
+# like:
+#
+# # DEVICE                           PATH         TYPE        OPTIONS
+# id=admin                           /mnt/ceph    fuse.ceph   defaults   0 0
+# id=myuser,conf=/etc/ceph/foo.conf  /mnt/ceph2   fuse.ceph   defaults   0 0
+#
+# where the device field is a comma-separated list of options to pass on
+# the command line.  The examples above, for example, specify that
+# ceph-fuse will authenticated as client.admin and client.myuser
+# (respectively), and the second example also sets the 'conf' option to
+# '/etc/ceph/foo.conf' via the ceph-fuse command line.  Any valid
+# ceph-fuse can be passed in this way.
+
+set -e
+options='--'`echo $1 | sed 's/,/ --/g'`
+shift
+exec ceph-fuse $options $@