aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Pärtel <martin.partel@gmail.com>2025-08-17 09:43:59 +0300
committerGitHub <noreply@github.com>2025-08-17 09:43:59 +0300
commit58bbb65e44416304e33c476ec5dd98051644dcdb (patch)
treeaf3b081d3f0bfc5c834853879b83f905221b3e50
parenta7464f2c3f1e8d779eee1fe3fbd35d2343547e80 (diff)
parent339be2fdfa763e39edb9ab63430ccace42cffd9c (diff)
downloadbindfs-58bbb65e44416304e33c476ec5dd98051644dcdb.tar.gz
Merge pull request #172 from NishiyamaPedro/openrc_unmount_fix
Add "-osubtype" to mount with the correct file system type. (Fixes #72)
-rw-r--r--src/bindfs.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/bindfs.c b/src/bindfs.c
index e0e4c1c..15e3c46 100644
--- a/src/bindfs.c
+++ b/src/bindfs.c
@@ -2900,6 +2900,19 @@ int main(int argc, char *argv[])
free(tmp);
}
+ /* OpenRC unmounts all filesystems with the "fuse" type when the network goes down (issue #72).
+
+ Because we set mntsrc as fsname to be consistent with "real" filesystems,
+ we need to add the subtype argument so that it doesn't mount with the "fuse" type.
+
+ Eg. "fuse.bindfs"
+ */
+#ifndef __FreeBSD__
+ char *tmp = sprintf_new("-osubtype=%s", my_basename(settings.progname));
+ fuse_opt_add_arg(&args, tmp);
+ free(tmp);
+#endif
+
// With FUSE 3, we disable caches in bindfs_init
#ifndef HAVE_FUSE_3
/* We need to disable the attribute cache whenever two users