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