diff options
author | Pedro Nishiyama <nishiyama.v3@gmail.com> | 2025-08-17 00:32:24 -0300 |
---|---|---|
committer | Pedro Nishiyama <nishiyama.v3@gmail.com> | 2025-08-17 00:54:36 -0300 |
commit | 339be2fdfa763e39edb9ab63430ccace42cffd9c (patch) | |
tree | af3b081d3f0bfc5c834853879b83f905221b3e50 /src | |
parent | a7464f2c3f1e8d779eee1fe3fbd35d2343547e80 (diff) | |
download | bindfs-339be2fdfa763e39edb9ab63430ccace42cffd9c.tar.gz |
Add "-osubtype" to mount with the correct file system type.
Fixes #72
Diffstat (limited to 'src')
-rw-r--r-- | src/bindfs.c | 13 |
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 |