<commit_before>module VagrantPlugins
  module Bindfs
    module Cap
      module Linux
        module BindfsInstalled

          def self.bindfs_installed(machine)
            machine.communicate.test("bindfs --help")
          end

          def self.loaded_fuse?(machine)
            machine.communicate.test("lsmod | grep -q fuse")
          end

          def self.modprobe_fuse(machine)
            machine.communicate.sudo("/sbin/modprobe fuse")
          end

        end
      end
    end
  end
end<commit_msg>Automatically add fuse to /etc/modules if not loaded at startup. Close #20<commit_after>module VagrantPlugins
  module Bindfs
    module Cap
      module Linux
        module BindfsInstalled

          def self.bindfs_installed(machine)
            machine.communicate.test("bindfs --help")
          end

          def self.loaded_fuse?(machine)
            machine.communicate.test("lsmod | grep -q fuse || grep -q fuse /etc/modules")
          end

          def self.modprobe_fuse(machine)
            unless machine.communicate.test("grep -q fuse /etc/modules")
              machine.communicate.sudo("bash -c \"echo 'fuse' >> /etc/modules\"")
            end
            machine.communicate.sudo("/sbin/modprobe fuse")
          end

        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.08404009252120277, 'fraction_numerical': 0.0015420200462606013, 'mean_word_length': 1.8402625820568927, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6639677', 'n_tokens_mistral': 386, 'n_tokens_neox': 362, 'n_words': 89}