aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolaus Rath <Nikolaus@rath.org>2017-09-20 14:24:22 +0100
committerNikolaus Rath <Nikolaus@rath.org>2017-09-20 14:43:34 +0100
commit949d76d1a2c508f034f23c36d34400204698d952 (patch)
tree99da720dc64f6341c05c7439a2301ee721771e4c
parent848ff30d9074371fecc332e67848375700189d05 (diff)
downloadsshfs-949d76d1a2c508f034f23c36d34400204698d952.tar
sshfs-949d76d1a2c508f034f23c36d34400204698d952.tar.gz
sshfs-949d76d1a2c508f034f23c36d34400204698d952.tar.bz2
sshfs-949d76d1a2c508f034f23c36d34400204698d952.zip
Add support for mounting from /etc/fstab
Fixes: #92.
-rw-r--r--ChangeLog.rst1
-rw-r--r--meson.build4
-rw-r--r--sshfs.rst8
-rwxr-xr-xutils/install_helper.sh19
4 files changed, 32 insertions, 0 deletions
diff --git a/ChangeLog.rst b/ChangeLog.rst
index 43749ca..dffae52 100644
--- a/ChangeLog.rst
+++ b/ChangeLog.rst
@@ -1,6 +1,7 @@
Unreleased Changes
------------------
+* Add support for mounting from /etc/fstab
* Dropped support for building with autotools.
* Added missing options to man page.
diff --git a/meson.build b/meson.build
index 62a285f..2069b90 100644
--- a/meson.build
+++ b/meson.build
@@ -63,6 +63,10 @@ else
message('rst2man not found, not building manual page.')
endif
+meson.add_install_script('utils/install_helper.sh',
+ get_option('sbindir'),
+ get_option('bindir'))
+
subdir('test')
diff --git a/sshfs.rst b/sshfs.rst
index 1239a21..7c763dd 100644
--- a/sshfs.rst
+++ b/sshfs.rst
@@ -253,6 +253,14 @@ without SSHFS being informed about that. As a workaround, you can try
to mount with ``-o ServerAliveInterval=15``. This will force the SSH
connection to stay alive even if you have no activity.
+Mounting from /etc/fstab
+========================
+
+To mount an SSHFS filesystem from ``/etc/fstab``, simply use ``sshfs`
+as the file system type. (For backwards compatibility, you may also
+use ``fuse.sshfs``).
+
+
See also
========
diff --git a/utils/install_helper.sh b/utils/install_helper.sh
new file mode 100755
index 0000000..c62686c
--- /dev/null
+++ b/utils/install_helper.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# Don't call this script. It is used internally by the Meson
+# build system. Thank you for your cooperation.
+#
+
+set -e
+
+bindir="$2"
+sbindir="$1"
+prefix="${MESON_INSTALL_DESTDIR_PREFIX}"
+
+mkdir -p "${prefix}/${sbindir}"
+
+ln -svf --relative "${prefix}/${bindir}/sshfs" \
+ "${prefix}/${sbindir}/mount.sshfs"
+
+ln -svf --relative "${prefix}/${bindir}/sshfs" \
+ "${prefix}/${sbindir}/mount.fuse.sshfs"