Sha256: 68758a728a076714a65c4813d9f88530b88e653f66cc4a92fda1ce0e4e52459c

Contents?: true

Size: 985 Bytes

Versions: 8

Compression:

Stored size: 985 Bytes

Contents

require 'puppet/provider/parsedfile'
require 'puppet/provider/mount'

fstab = nil
case Facter.value(:operatingsystem)
when "Solaris": fstab = "/etc/vfstab"
else
    fstab = "/etc/fstab"
end

Puppet::Type.type(:mount).provide(:parsed,
    :parent => Puppet::Provider::ParsedFile,
    :default_target => fstab,
    :filetype => :flat
) do
    include Puppet::Provider::Mount
    #confine :exists => fstab

    commands :mountcmd => "mount", :umount => "umount"

    @platform = Facter["operatingsystem"].value
    case @platform
    when "Solaris":
        @fields = [:device, :blockdevice, :name, :fstype, :pass, :atboot,
               :options]
    else
        @fields = [:device, :name, :fstype, :options, :dump, :pass]
        @fielddefaults = [ nil ] * 4 + [ "0", "2" ]
    end

    text_line :comment, :match => /^\s*#/
    text_line :blank, :match => /^\s*$/

    record_line self.name, :fields => @fields, :separator => /\s+/, :joiner => "\t", :optional => [:pass, :dump]
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
puppet-0.24.9 lib/puppet/provider/mount/parsed.rb
puppet-0.24.4 lib/puppet/provider/mount/parsed.rb
puppet-0.24.2 lib/puppet/provider/mount/parsed.rb
puppet-0.24.3 lib/puppet/provider/mount/parsed.rb
puppet-0.24.7 lib/puppet/provider/mount/parsed.rb
puppet-0.24.6 lib/puppet/provider/mount/parsed.rb
puppet-0.24.5 lib/puppet/provider/mount/parsed.rb
puppet-0.24.8 lib/puppet/provider/mount/parsed.rb