Commit 683decb0 authored by Aaron Jacobs's avatar Aaron Jacobs

Work around a bug in systemd by always setting fsname.

See bazil/fuse#89 for more details.
parent 32fbc7f9
......@@ -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?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment