diff --git a/mounted_file_system.go b/mounted_file_system.go index e7bb812..6b52ad4 100644 --- a/mounted_file_system.go +++ b/mounted_file_system.go @@ -114,9 +114,23 @@ func (c *MountConfig) bazilfuseOptions() (opts []bazilfuse.MountOption) { // InodeAttributes.Mode. opts = append(opts, bazilfuse.SetOption("default_permissions", "")) + // HACK(jacobsa): Work around what appears to be a bug in systemd v219, as + // shipped in Ubuntu 15.04, where it automatically unmounts any file system + // that doesn't set an explicit name. + // + // When Ubuntu contains systemd v220, this workaround should be removed and + // the systemd bug reopened if the problem persists. + // + // Cf. https://github.com/bazil/fuse/issues/89 + // Cf. https://bugs.freedesktop.org/show_bug.cgi?id=90907 + fsname := c.FSName + if runtime.GOOS == "linux" && fsname == "" { + fsname = "some_fuse_file_system" + } + // Special file system name? - if c.FSName != "" { - opts = append(opts, bazilfuse.FSName(c.FSName)) + if fsname != "" { + opts = append(opts, bazilfuse.FSName(fsname)) } // Read only?