From 949d76d1a2c508f034f23c36d34400204698d952 Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Wed, 20 Sep 2017 14:24:22 +0100 Subject: [PATCH] Add support for mounting from /etc/fstab Fixes: #92. --- ChangeLog.rst | 1 + meson.build | 4 ++++ sshfs.rst | 8 ++++++++ utils/install_helper.sh | 19 +++++++++++++++++++ 4 files changed, 32 insertions(+) create mode 100755 utils/install_helper.sh 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"