Sha256: 716f45059f6c83001c45ca7f70cc827a00ffc8d00f70fdc7242f07d0c2a17813

Contents?: true

Size: 1018 Bytes

Versions: 1

Compression:

Stored size: 1018 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", :df => "df"

    @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"
end

# $Id: parsed.rb 1860 2006-11-12 21:25:13Z luke $

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
puppet-0.22.4 lib/puppet/provider/mount/parsed.rb