# class Chef::Provider::Mount

### Public Instance Methods

action_disable() click to toggle source

    # File lib/chef/provider/mount.rb, line 94
    def action_disable
      if @current_resource.enabled
        converge_by("remount #{@current_resource.device}") do
          status = disable_fs
          if status
            Chef::Log.info("#{@new_resource} disabled")
          else
            Chef::Log.debug("#{@new_resource} already disabled")
          end
        end
      end
    end

action_enable() click to toggle source

    # File lib/chef/provider/mount.rb, line 81
    def action_enable
      unless @current_resource.enabled && mount_options_unchanged?
        converge_by("remount #{@current_resource.device}") do
          status = enable_fs
          if status
            Chef::Log.info("#{@new_resource} enabled")
          else
            Chef::Log.debug("#{@new_resource} already enabled")
          end
        end
      end
    end

action_mount() click to toggle source

    # File lib/chef/provider/mount.rb, line 38
    def action_mount
      unless @current_resource.mounted
        converge_by("mount #{@current_resource.device} to #{@current_resource.mount_point}") do
          status = mount_fs()
          if status
            Chef::Log.info("#{@new_resource} mounted")
          end
        end
      else
        Chef::Log.debug("#{@new_resource} is already mounted")
      end
    end

action_remount() click to toggle source

    # File lib/chef/provider/mount.rb, line 64
    def action_remount
      unless @new_resource.supports[:remount]
        raise Chef::Exceptions::UnsupportedAction, "#{self.to_s} does not support :remount"
      else
        if @current_resource.mounted
          converge_by("remount #{@current_resource.device}") do
            status = remount_fs()
            if status
              Chef::Log.info("#{@new_resource} remounted")
            end
          end
        else
          Chef::Log.debug("#{@new_resource} not mounted, nothing to remount")
        end
      end
    end

action_umount() click to toggle source

    # File lib/chef/provider/mount.rb, line 51
    def action_umount
      if @current_resource.mounted
        converge_by("unmount #{@current_resource.device}") do
          status = umount_fs()
          if status
            Chef::Log.info("#{@new_resource} unmounted")
          end
        end
      else
        Chef::Log.debug("#{@new_resource} is already unmounted")
      end
    end

disable_fs() click to toggle source

    # File lib/chef/provider/mount.rb, line 123
    def disable_fs
      raise Chef::Exceptions::UnsupportedAction, "#{self.to_s} does not support :disable"
    end

enable_fs() click to toggle source

    # File lib/chef/provider/mount.rb, line 119
    def enable_fs
      raise Chef::Exceptions::UnsupportedAction, "#{self.to_s} does not support :enable"
    end

load_current_resource() click to toggle source

    # File lib/chef/provider/mount.rb, line 34
    def load_current_resource
      true
    end

mount_fs() click to toggle source

    # File lib/chef/provider/mount.rb, line 107
    def mount_fs
      raise Chef::Exceptions::UnsupportedAction, "#{self.to_s} does not support :mount"
    end

remount_fs() click to toggle source

    # File lib/chef/provider/mount.rb, line 115
    def remount_fs
      raise Chef::Exceptions::UnsupportedAction, "#{self.to_s} does not support :remount"
    end

umount_fs() click to toggle source

    # File lib/chef/provider/mount.rb, line 111
    def umount_fs
      raise Chef::Exceptions::UnsupportedAction, "#{self.to_s} does not support :umount"
    end

whyrun_supported?() click to toggle source

    # File lib/chef/provider/mount.rb, line 30
    def whyrun_supported?
      true
    end